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.

13797 lines
330 KiB

7 years ago
7 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/abci/types.proto
  3. package types
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. _ "github.com/gogo/protobuf/types"
  10. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  11. crypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
  12. types1 "github.com/tendermint/tendermint/proto/tendermint/types"
  13. grpc "google.golang.org/grpc"
  14. codes "google.golang.org/grpc/codes"
  15. status "google.golang.org/grpc/status"
  16. io "io"
  17. math "math"
  18. math_bits "math/bits"
  19. time "time"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. var _ = time.Kitchen
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  31. type CheckTxType int32
  32. const (
  33. CheckTxType_New CheckTxType = 0
  34. CheckTxType_Recheck CheckTxType = 1
  35. )
  36. var CheckTxType_name = map[int32]string{
  37. 0: "NEW",
  38. 1: "RECHECK",
  39. }
  40. var CheckTxType_value = map[string]int32{
  41. "NEW": 0,
  42. "RECHECK": 1,
  43. }
  44. func (x CheckTxType) String() string {
  45. return proto.EnumName(CheckTxType_name, int32(x))
  46. }
  47. func (CheckTxType) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_252557cfdd89a31a, []int{0}
  49. }
  50. type EvidenceType int32
  51. const (
  52. EvidenceType_UNKNOWN EvidenceType = 0
  53. EvidenceType_DUPLICATE_VOTE EvidenceType = 1
  54. EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2
  55. )
  56. var EvidenceType_name = map[int32]string{
  57. 0: "UNKNOWN",
  58. 1: "DUPLICATE_VOTE",
  59. 2: "LIGHT_CLIENT_ATTACK",
  60. }
  61. var EvidenceType_value = map[string]int32{
  62. "UNKNOWN": 0,
  63. "DUPLICATE_VOTE": 1,
  64. "LIGHT_CLIENT_ATTACK": 2,
  65. }
  66. func (x EvidenceType) String() string {
  67. return proto.EnumName(EvidenceType_name, int32(x))
  68. }
  69. func (EvidenceType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_252557cfdd89a31a, []int{1}
  71. }
  72. type ResponseOfferSnapshot_Result int32
  73. const (
  74. ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0
  75. ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1
  76. ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2
  77. ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3
  78. ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4
  79. ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5
  80. )
  81. var ResponseOfferSnapshot_Result_name = map[int32]string{
  82. 0: "UNKNOWN",
  83. 1: "ACCEPT",
  84. 2: "ABORT",
  85. 3: "REJECT",
  86. 4: "REJECT_FORMAT",
  87. 5: "REJECT_SENDER",
  88. }
  89. var ResponseOfferSnapshot_Result_value = map[string]int32{
  90. "UNKNOWN": 0,
  91. "ACCEPT": 1,
  92. "ABORT": 2,
  93. "REJECT": 3,
  94. "REJECT_FORMAT": 4,
  95. "REJECT_SENDER": 5,
  96. }
  97. func (x ResponseOfferSnapshot_Result) String() string {
  98. return proto.EnumName(ResponseOfferSnapshot_Result_name, int32(x))
  99. }
  100. func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) {
  101. return fileDescriptor_252557cfdd89a31a, []int{28, 0}
  102. }
  103. type ResponseApplySnapshotChunk_Result int32
  104. const (
  105. ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0
  106. ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1
  107. ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2
  108. ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3
  109. ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4
  110. ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5
  111. )
  112. var ResponseApplySnapshotChunk_Result_name = map[int32]string{
  113. 0: "UNKNOWN",
  114. 1: "ACCEPT",
  115. 2: "ABORT",
  116. 3: "RETRY",
  117. 4: "RETRY_SNAPSHOT",
  118. 5: "REJECT_SNAPSHOT",
  119. }
  120. var ResponseApplySnapshotChunk_Result_value = map[string]int32{
  121. "UNKNOWN": 0,
  122. "ACCEPT": 1,
  123. "ABORT": 2,
  124. "RETRY": 3,
  125. "RETRY_SNAPSHOT": 4,
  126. "REJECT_SNAPSHOT": 5,
  127. }
  128. func (x ResponseApplySnapshotChunk_Result) String() string {
  129. return proto.EnumName(ResponseApplySnapshotChunk_Result_name, int32(x))
  130. }
  131. func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) {
  132. return fileDescriptor_252557cfdd89a31a, []int{30, 0}
  133. }
  134. type Request struct {
  135. // Types that are valid to be assigned to Value:
  136. // *Request_Echo
  137. // *Request_Flush
  138. // *Request_Info
  139. // *Request_InitChain
  140. // *Request_Query
  141. // *Request_BeginBlock
  142. // *Request_CheckTx
  143. // *Request_DeliverTx
  144. // *Request_EndBlock
  145. // *Request_Commit
  146. // *Request_ListSnapshots
  147. // *Request_OfferSnapshot
  148. // *Request_LoadSnapshotChunk
  149. // *Request_ApplySnapshotChunk
  150. Value isRequest_Value `protobuf_oneof:"value"`
  151. }
  152. func (m *Request) Reset() { *m = Request{} }
  153. func (m *Request) String() string { return proto.CompactTextString(m) }
  154. func (*Request) ProtoMessage() {}
  155. func (*Request) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_252557cfdd89a31a, []int{0}
  157. }
  158. func (m *Request) XXX_Unmarshal(b []byte) error {
  159. return m.Unmarshal(b)
  160. }
  161. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. if deterministic {
  163. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  164. } else {
  165. b = b[:cap(b)]
  166. n, err := m.MarshalToSizedBuffer(b)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return b[:n], nil
  171. }
  172. }
  173. func (m *Request) XXX_Merge(src proto.Message) {
  174. xxx_messageInfo_Request.Merge(m, src)
  175. }
  176. func (m *Request) XXX_Size() int {
  177. return m.Size()
  178. }
  179. func (m *Request) XXX_DiscardUnknown() {
  180. xxx_messageInfo_Request.DiscardUnknown(m)
  181. }
  182. var xxx_messageInfo_Request proto.InternalMessageInfo
  183. type isRequest_Value interface {
  184. isRequest_Value()
  185. MarshalTo([]byte) (int, error)
  186. Size() int
  187. }
  188. type Request_Echo struct {
  189. Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  190. }
  191. type Request_Flush struct {
  192. Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  193. }
  194. type Request_Info struct {
  195. Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"`
  196. }
  197. type Request_InitChain struct {
  198. InitChain *RequestInitChain `protobuf:"bytes,4,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  199. }
  200. type Request_Query struct {
  201. Query *RequestQuery `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
  202. }
  203. type Request_BeginBlock struct {
  204. BeginBlock *RequestBeginBlock `protobuf:"bytes,6,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  205. }
  206. type Request_CheckTx struct {
  207. CheckTx *RequestCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  208. }
  209. type Request_DeliverTx struct {
  210. DeliverTx *RequestDeliverTx `protobuf:"bytes,8,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  211. }
  212. type Request_EndBlock struct {
  213. EndBlock *RequestEndBlock `protobuf:"bytes,9,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  214. }
  215. type Request_Commit struct {
  216. Commit *RequestCommit `protobuf:"bytes,10,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  217. }
  218. type Request_ListSnapshots struct {
  219. ListSnapshots *RequestListSnapshots `protobuf:"bytes,11,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  220. }
  221. type Request_OfferSnapshot struct {
  222. OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,12,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  223. }
  224. type Request_LoadSnapshotChunk struct {
  225. LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,13,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  226. }
  227. type Request_ApplySnapshotChunk struct {
  228. ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,14,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  229. }
  230. func (*Request_Echo) isRequest_Value() {}
  231. func (*Request_Flush) isRequest_Value() {}
  232. func (*Request_Info) isRequest_Value() {}
  233. func (*Request_InitChain) isRequest_Value() {}
  234. func (*Request_Query) isRequest_Value() {}
  235. func (*Request_BeginBlock) isRequest_Value() {}
  236. func (*Request_CheckTx) isRequest_Value() {}
  237. func (*Request_DeliverTx) isRequest_Value() {}
  238. func (*Request_EndBlock) isRequest_Value() {}
  239. func (*Request_Commit) isRequest_Value() {}
  240. func (*Request_ListSnapshots) isRequest_Value() {}
  241. func (*Request_OfferSnapshot) isRequest_Value() {}
  242. func (*Request_LoadSnapshotChunk) isRequest_Value() {}
  243. func (*Request_ApplySnapshotChunk) isRequest_Value() {}
  244. func (m *Request) GetValue() isRequest_Value {
  245. if m != nil {
  246. return m.Value
  247. }
  248. return nil
  249. }
  250. func (m *Request) GetEcho() *RequestEcho {
  251. if x, ok := m.GetValue().(*Request_Echo); ok {
  252. return x.Echo
  253. }
  254. return nil
  255. }
  256. func (m *Request) GetFlush() *RequestFlush {
  257. if x, ok := m.GetValue().(*Request_Flush); ok {
  258. return x.Flush
  259. }
  260. return nil
  261. }
  262. func (m *Request) GetInfo() *RequestInfo {
  263. if x, ok := m.GetValue().(*Request_Info); ok {
  264. return x.Info
  265. }
  266. return nil
  267. }
  268. func (m *Request) GetInitChain() *RequestInitChain {
  269. if x, ok := m.GetValue().(*Request_InitChain); ok {
  270. return x.InitChain
  271. }
  272. return nil
  273. }
  274. func (m *Request) GetQuery() *RequestQuery {
  275. if x, ok := m.GetValue().(*Request_Query); ok {
  276. return x.Query
  277. }
  278. return nil
  279. }
  280. func (m *Request) GetBeginBlock() *RequestBeginBlock {
  281. if x, ok := m.GetValue().(*Request_BeginBlock); ok {
  282. return x.BeginBlock
  283. }
  284. return nil
  285. }
  286. func (m *Request) GetCheckTx() *RequestCheckTx {
  287. if x, ok := m.GetValue().(*Request_CheckTx); ok {
  288. return x.CheckTx
  289. }
  290. return nil
  291. }
  292. func (m *Request) GetDeliverTx() *RequestDeliverTx {
  293. if x, ok := m.GetValue().(*Request_DeliverTx); ok {
  294. return x.DeliverTx
  295. }
  296. return nil
  297. }
  298. func (m *Request) GetEndBlock() *RequestEndBlock {
  299. if x, ok := m.GetValue().(*Request_EndBlock); ok {
  300. return x.EndBlock
  301. }
  302. return nil
  303. }
  304. func (m *Request) GetCommit() *RequestCommit {
  305. if x, ok := m.GetValue().(*Request_Commit); ok {
  306. return x.Commit
  307. }
  308. return nil
  309. }
  310. func (m *Request) GetListSnapshots() *RequestListSnapshots {
  311. if x, ok := m.GetValue().(*Request_ListSnapshots); ok {
  312. return x.ListSnapshots
  313. }
  314. return nil
  315. }
  316. func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot {
  317. if x, ok := m.GetValue().(*Request_OfferSnapshot); ok {
  318. return x.OfferSnapshot
  319. }
  320. return nil
  321. }
  322. func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk {
  323. if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok {
  324. return x.LoadSnapshotChunk
  325. }
  326. return nil
  327. }
  328. func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk {
  329. if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok {
  330. return x.ApplySnapshotChunk
  331. }
  332. return nil
  333. }
  334. // XXX_OneofWrappers is for the internal use of the proto package.
  335. func (*Request) XXX_OneofWrappers() []interface{} {
  336. return []interface{}{
  337. (*Request_Echo)(nil),
  338. (*Request_Flush)(nil),
  339. (*Request_Info)(nil),
  340. (*Request_InitChain)(nil),
  341. (*Request_Query)(nil),
  342. (*Request_BeginBlock)(nil),
  343. (*Request_CheckTx)(nil),
  344. (*Request_DeliverTx)(nil),
  345. (*Request_EndBlock)(nil),
  346. (*Request_Commit)(nil),
  347. (*Request_ListSnapshots)(nil),
  348. (*Request_OfferSnapshot)(nil),
  349. (*Request_LoadSnapshotChunk)(nil),
  350. (*Request_ApplySnapshotChunk)(nil),
  351. }
  352. }
  353. type RequestEcho struct {
  354. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  355. }
  356. func (m *RequestEcho) Reset() { *m = RequestEcho{} }
  357. func (m *RequestEcho) String() string { return proto.CompactTextString(m) }
  358. func (*RequestEcho) ProtoMessage() {}
  359. func (*RequestEcho) Descriptor() ([]byte, []int) {
  360. return fileDescriptor_252557cfdd89a31a, []int{1}
  361. }
  362. func (m *RequestEcho) XXX_Unmarshal(b []byte) error {
  363. return m.Unmarshal(b)
  364. }
  365. func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  366. if deterministic {
  367. return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic)
  368. } else {
  369. b = b[:cap(b)]
  370. n, err := m.MarshalToSizedBuffer(b)
  371. if err != nil {
  372. return nil, err
  373. }
  374. return b[:n], nil
  375. }
  376. }
  377. func (m *RequestEcho) XXX_Merge(src proto.Message) {
  378. xxx_messageInfo_RequestEcho.Merge(m, src)
  379. }
  380. func (m *RequestEcho) XXX_Size() int {
  381. return m.Size()
  382. }
  383. func (m *RequestEcho) XXX_DiscardUnknown() {
  384. xxx_messageInfo_RequestEcho.DiscardUnknown(m)
  385. }
  386. var xxx_messageInfo_RequestEcho proto.InternalMessageInfo
  387. func (m *RequestEcho) GetMessage() string {
  388. if m != nil {
  389. return m.Message
  390. }
  391. return ""
  392. }
  393. type RequestFlush struct {
  394. }
  395. func (m *RequestFlush) Reset() { *m = RequestFlush{} }
  396. func (m *RequestFlush) String() string { return proto.CompactTextString(m) }
  397. func (*RequestFlush) ProtoMessage() {}
  398. func (*RequestFlush) Descriptor() ([]byte, []int) {
  399. return fileDescriptor_252557cfdd89a31a, []int{2}
  400. }
  401. func (m *RequestFlush) XXX_Unmarshal(b []byte) error {
  402. return m.Unmarshal(b)
  403. }
  404. func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  405. if deterministic {
  406. return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic)
  407. } else {
  408. b = b[:cap(b)]
  409. n, err := m.MarshalToSizedBuffer(b)
  410. if err != nil {
  411. return nil, err
  412. }
  413. return b[:n], nil
  414. }
  415. }
  416. func (m *RequestFlush) XXX_Merge(src proto.Message) {
  417. xxx_messageInfo_RequestFlush.Merge(m, src)
  418. }
  419. func (m *RequestFlush) XXX_Size() int {
  420. return m.Size()
  421. }
  422. func (m *RequestFlush) XXX_DiscardUnknown() {
  423. xxx_messageInfo_RequestFlush.DiscardUnknown(m)
  424. }
  425. var xxx_messageInfo_RequestFlush proto.InternalMessageInfo
  426. type RequestInfo struct {
  427. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  428. BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"`
  429. P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"`
  430. AbciVersion string `protobuf:"bytes,4,opt,name=abci_version,json=abciVersion,proto3" json:"abci_version,omitempty"`
  431. }
  432. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  433. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  434. func (*RequestInfo) ProtoMessage() {}
  435. func (*RequestInfo) Descriptor() ([]byte, []int) {
  436. return fileDescriptor_252557cfdd89a31a, []int{3}
  437. }
  438. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  439. return m.Unmarshal(b)
  440. }
  441. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  442. if deterministic {
  443. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  444. } else {
  445. b = b[:cap(b)]
  446. n, err := m.MarshalToSizedBuffer(b)
  447. if err != nil {
  448. return nil, err
  449. }
  450. return b[:n], nil
  451. }
  452. }
  453. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  454. xxx_messageInfo_RequestInfo.Merge(m, src)
  455. }
  456. func (m *RequestInfo) XXX_Size() int {
  457. return m.Size()
  458. }
  459. func (m *RequestInfo) XXX_DiscardUnknown() {
  460. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  461. }
  462. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  463. func (m *RequestInfo) GetVersion() string {
  464. if m != nil {
  465. return m.Version
  466. }
  467. return ""
  468. }
  469. func (m *RequestInfo) GetBlockVersion() uint64 {
  470. if m != nil {
  471. return m.BlockVersion
  472. }
  473. return 0
  474. }
  475. func (m *RequestInfo) GetP2PVersion() uint64 {
  476. if m != nil {
  477. return m.P2PVersion
  478. }
  479. return 0
  480. }
  481. func (m *RequestInfo) GetAbciVersion() string {
  482. if m != nil {
  483. return m.AbciVersion
  484. }
  485. return ""
  486. }
  487. type RequestInitChain struct {
  488. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  489. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  490. ConsensusParams *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() *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 *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() *ConsensusParams {
  1487. if m != nil {
  1488. return m.ConsensusParams
  1489. }
  1490. return nil
  1491. }
  1492. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1493. if m != nil {
  1494. return m.Validators
  1495. }
  1496. return nil
  1497. }
  1498. func (m *ResponseInitChain) GetAppHash() []byte {
  1499. if m != nil {
  1500. return m.AppHash
  1501. }
  1502. return nil
  1503. }
  1504. type ResponseQuery struct {
  1505. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1506. // bytes data = 2; // use "value" instead.
  1507. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1508. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1509. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1510. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1511. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1512. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1513. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1514. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1515. }
  1516. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1517. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1518. func (*ResponseQuery) ProtoMessage() {}
  1519. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1520. return fileDescriptor_252557cfdd89a31a, []int{21}
  1521. }
  1522. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1523. return m.Unmarshal(b)
  1524. }
  1525. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1526. if deterministic {
  1527. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1528. } else {
  1529. b = b[:cap(b)]
  1530. n, err := m.MarshalToSizedBuffer(b)
  1531. if err != nil {
  1532. return nil, err
  1533. }
  1534. return b[:n], nil
  1535. }
  1536. }
  1537. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1538. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1539. }
  1540. func (m *ResponseQuery) XXX_Size() int {
  1541. return m.Size()
  1542. }
  1543. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1544. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1545. }
  1546. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1547. func (m *ResponseQuery) GetCode() uint32 {
  1548. if m != nil {
  1549. return m.Code
  1550. }
  1551. return 0
  1552. }
  1553. func (m *ResponseQuery) GetLog() string {
  1554. if m != nil {
  1555. return m.Log
  1556. }
  1557. return ""
  1558. }
  1559. func (m *ResponseQuery) GetInfo() string {
  1560. if m != nil {
  1561. return m.Info
  1562. }
  1563. return ""
  1564. }
  1565. func (m *ResponseQuery) GetIndex() int64 {
  1566. if m != nil {
  1567. return m.Index
  1568. }
  1569. return 0
  1570. }
  1571. func (m *ResponseQuery) GetKey() []byte {
  1572. if m != nil {
  1573. return m.Key
  1574. }
  1575. return nil
  1576. }
  1577. func (m *ResponseQuery) GetValue() []byte {
  1578. if m != nil {
  1579. return m.Value
  1580. }
  1581. return nil
  1582. }
  1583. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1584. if m != nil {
  1585. return m.ProofOps
  1586. }
  1587. return nil
  1588. }
  1589. func (m *ResponseQuery) GetHeight() int64 {
  1590. if m != nil {
  1591. return m.Height
  1592. }
  1593. return 0
  1594. }
  1595. func (m *ResponseQuery) GetCodespace() string {
  1596. if m != nil {
  1597. return m.Codespace
  1598. }
  1599. return ""
  1600. }
  1601. type ResponseBeginBlock struct {
  1602. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1603. }
  1604. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1605. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1606. func (*ResponseBeginBlock) ProtoMessage() {}
  1607. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1608. return fileDescriptor_252557cfdd89a31a, []int{22}
  1609. }
  1610. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1611. return m.Unmarshal(b)
  1612. }
  1613. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1614. if deterministic {
  1615. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1616. } else {
  1617. b = b[:cap(b)]
  1618. n, err := m.MarshalToSizedBuffer(b)
  1619. if err != nil {
  1620. return nil, err
  1621. }
  1622. return b[:n], nil
  1623. }
  1624. }
  1625. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1626. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1627. }
  1628. func (m *ResponseBeginBlock) XXX_Size() int {
  1629. return m.Size()
  1630. }
  1631. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1632. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1633. }
  1634. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1635. func (m *ResponseBeginBlock) GetEvents() []Event {
  1636. if m != nil {
  1637. return m.Events
  1638. }
  1639. return nil
  1640. }
  1641. type ResponseCheckTx struct {
  1642. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1643. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1644. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1645. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1646. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1647. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1648. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1649. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1650. }
  1651. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1652. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1653. func (*ResponseCheckTx) ProtoMessage() {}
  1654. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1655. return fileDescriptor_252557cfdd89a31a, []int{23}
  1656. }
  1657. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1658. return m.Unmarshal(b)
  1659. }
  1660. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1661. if deterministic {
  1662. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1663. } else {
  1664. b = b[:cap(b)]
  1665. n, err := m.MarshalToSizedBuffer(b)
  1666. if err != nil {
  1667. return nil, err
  1668. }
  1669. return b[:n], nil
  1670. }
  1671. }
  1672. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1673. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1674. }
  1675. func (m *ResponseCheckTx) XXX_Size() int {
  1676. return m.Size()
  1677. }
  1678. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1679. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1680. }
  1681. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1682. func (m *ResponseCheckTx) GetCode() uint32 {
  1683. if m != nil {
  1684. return m.Code
  1685. }
  1686. return 0
  1687. }
  1688. func (m *ResponseCheckTx) GetData() []byte {
  1689. if m != nil {
  1690. return m.Data
  1691. }
  1692. return nil
  1693. }
  1694. func (m *ResponseCheckTx) GetLog() string {
  1695. if m != nil {
  1696. return m.Log
  1697. }
  1698. return ""
  1699. }
  1700. func (m *ResponseCheckTx) GetInfo() string {
  1701. if m != nil {
  1702. return m.Info
  1703. }
  1704. return ""
  1705. }
  1706. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1707. if m != nil {
  1708. return m.GasWanted
  1709. }
  1710. return 0
  1711. }
  1712. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1713. if m != nil {
  1714. return m.GasUsed
  1715. }
  1716. return 0
  1717. }
  1718. func (m *ResponseCheckTx) GetEvents() []Event {
  1719. if m != nil {
  1720. return m.Events
  1721. }
  1722. return nil
  1723. }
  1724. func (m *ResponseCheckTx) GetCodespace() string {
  1725. if m != nil {
  1726. return m.Codespace
  1727. }
  1728. return ""
  1729. }
  1730. type ResponseDeliverTx struct {
  1731. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1732. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1733. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1734. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1735. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1736. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1737. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1738. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1739. }
  1740. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1741. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1742. func (*ResponseDeliverTx) ProtoMessage() {}
  1743. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1744. return fileDescriptor_252557cfdd89a31a, []int{24}
  1745. }
  1746. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1747. return m.Unmarshal(b)
  1748. }
  1749. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1750. if deterministic {
  1751. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1752. } else {
  1753. b = b[:cap(b)]
  1754. n, err := m.MarshalToSizedBuffer(b)
  1755. if err != nil {
  1756. return nil, err
  1757. }
  1758. return b[:n], nil
  1759. }
  1760. }
  1761. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1762. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1763. }
  1764. func (m *ResponseDeliverTx) XXX_Size() int {
  1765. return m.Size()
  1766. }
  1767. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1768. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1769. }
  1770. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1771. func (m *ResponseDeliverTx) GetCode() uint32 {
  1772. if m != nil {
  1773. return m.Code
  1774. }
  1775. return 0
  1776. }
  1777. func (m *ResponseDeliverTx) GetData() []byte {
  1778. if m != nil {
  1779. return m.Data
  1780. }
  1781. return nil
  1782. }
  1783. func (m *ResponseDeliverTx) GetLog() string {
  1784. if m != nil {
  1785. return m.Log
  1786. }
  1787. return ""
  1788. }
  1789. func (m *ResponseDeliverTx) GetInfo() string {
  1790. if m != nil {
  1791. return m.Info
  1792. }
  1793. return ""
  1794. }
  1795. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1796. if m != nil {
  1797. return m.GasWanted
  1798. }
  1799. return 0
  1800. }
  1801. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1802. if m != nil {
  1803. return m.GasUsed
  1804. }
  1805. return 0
  1806. }
  1807. func (m *ResponseDeliverTx) GetEvents() []Event {
  1808. if m != nil {
  1809. return m.Events
  1810. }
  1811. return nil
  1812. }
  1813. func (m *ResponseDeliverTx) GetCodespace() string {
  1814. if m != nil {
  1815. return m.Codespace
  1816. }
  1817. return ""
  1818. }
  1819. type ResponseEndBlock struct {
  1820. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1821. ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1822. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1823. }
  1824. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1825. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1826. func (*ResponseEndBlock) ProtoMessage() {}
  1827. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1828. return fileDescriptor_252557cfdd89a31a, []int{25}
  1829. }
  1830. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1831. return m.Unmarshal(b)
  1832. }
  1833. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1834. if deterministic {
  1835. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1836. } else {
  1837. b = b[:cap(b)]
  1838. n, err := m.MarshalToSizedBuffer(b)
  1839. if err != nil {
  1840. return nil, err
  1841. }
  1842. return b[:n], nil
  1843. }
  1844. }
  1845. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1846. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1847. }
  1848. func (m *ResponseEndBlock) XXX_Size() int {
  1849. return m.Size()
  1850. }
  1851. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1852. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1853. }
  1854. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1855. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1856. if m != nil {
  1857. return m.ValidatorUpdates
  1858. }
  1859. return nil
  1860. }
  1861. func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams {
  1862. if m != nil {
  1863. return m.ConsensusParamUpdates
  1864. }
  1865. return nil
  1866. }
  1867. func (m *ResponseEndBlock) GetEvents() []Event {
  1868. if m != nil {
  1869. return m.Events
  1870. }
  1871. return nil
  1872. }
  1873. type ResponseCommit struct {
  1874. // reserve 1
  1875. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1876. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1877. }
  1878. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1879. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1880. func (*ResponseCommit) ProtoMessage() {}
  1881. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1882. return fileDescriptor_252557cfdd89a31a, []int{26}
  1883. }
  1884. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1885. return m.Unmarshal(b)
  1886. }
  1887. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1888. if deterministic {
  1889. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1890. } else {
  1891. b = b[:cap(b)]
  1892. n, err := m.MarshalToSizedBuffer(b)
  1893. if err != nil {
  1894. return nil, err
  1895. }
  1896. return b[:n], nil
  1897. }
  1898. }
  1899. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1900. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1901. }
  1902. func (m *ResponseCommit) XXX_Size() int {
  1903. return m.Size()
  1904. }
  1905. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1906. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1907. }
  1908. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1909. func (m *ResponseCommit) GetData() []byte {
  1910. if m != nil {
  1911. return m.Data
  1912. }
  1913. return nil
  1914. }
  1915. func (m *ResponseCommit) GetRetainHeight() int64 {
  1916. if m != nil {
  1917. return m.RetainHeight
  1918. }
  1919. return 0
  1920. }
  1921. type ResponseListSnapshots struct {
  1922. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1923. }
  1924. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1925. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1926. func (*ResponseListSnapshots) ProtoMessage() {}
  1927. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1928. return fileDescriptor_252557cfdd89a31a, []int{27}
  1929. }
  1930. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1931. return m.Unmarshal(b)
  1932. }
  1933. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1934. if deterministic {
  1935. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1936. } else {
  1937. b = b[:cap(b)]
  1938. n, err := m.MarshalToSizedBuffer(b)
  1939. if err != nil {
  1940. return nil, err
  1941. }
  1942. return b[:n], nil
  1943. }
  1944. }
  1945. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1946. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1947. }
  1948. func (m *ResponseListSnapshots) XXX_Size() int {
  1949. return m.Size()
  1950. }
  1951. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1952. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1953. }
  1954. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1955. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1956. if m != nil {
  1957. return m.Snapshots
  1958. }
  1959. return nil
  1960. }
  1961. type ResponseOfferSnapshot struct {
  1962. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1963. }
  1964. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1965. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1966. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1967. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1968. return fileDescriptor_252557cfdd89a31a, []int{28}
  1969. }
  1970. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1971. return m.Unmarshal(b)
  1972. }
  1973. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1974. if deterministic {
  1975. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1976. } else {
  1977. b = b[:cap(b)]
  1978. n, err := m.MarshalToSizedBuffer(b)
  1979. if err != nil {
  1980. return nil, err
  1981. }
  1982. return b[:n], nil
  1983. }
  1984. }
  1985. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  1986. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  1987. }
  1988. func (m *ResponseOfferSnapshot) XXX_Size() int {
  1989. return m.Size()
  1990. }
  1991. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  1992. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  1993. }
  1994. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  1995. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  1996. if m != nil {
  1997. return m.Result
  1998. }
  1999. return ResponseOfferSnapshot_UNKNOWN
  2000. }
  2001. type ResponseLoadSnapshotChunk struct {
  2002. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2003. }
  2004. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2005. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2006. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2007. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2008. return fileDescriptor_252557cfdd89a31a, []int{29}
  2009. }
  2010. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2011. return m.Unmarshal(b)
  2012. }
  2013. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2014. if deterministic {
  2015. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2016. } else {
  2017. b = b[:cap(b)]
  2018. n, err := m.MarshalToSizedBuffer(b)
  2019. if err != nil {
  2020. return nil, err
  2021. }
  2022. return b[:n], nil
  2023. }
  2024. }
  2025. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2026. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2027. }
  2028. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2029. return m.Size()
  2030. }
  2031. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2032. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2033. }
  2034. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2035. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2036. if m != nil {
  2037. return m.Chunk
  2038. }
  2039. return nil
  2040. }
  2041. type ResponseApplySnapshotChunk struct {
  2042. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2043. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2044. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2045. }
  2046. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2047. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2048. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2049. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2050. return fileDescriptor_252557cfdd89a31a, []int{30}
  2051. }
  2052. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2053. return m.Unmarshal(b)
  2054. }
  2055. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2056. if deterministic {
  2057. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2058. } else {
  2059. b = b[:cap(b)]
  2060. n, err := m.MarshalToSizedBuffer(b)
  2061. if err != nil {
  2062. return nil, err
  2063. }
  2064. return b[:n], nil
  2065. }
  2066. }
  2067. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2068. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2069. }
  2070. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2071. return m.Size()
  2072. }
  2073. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2074. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2075. }
  2076. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2077. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2078. if m != nil {
  2079. return m.Result
  2080. }
  2081. return ResponseApplySnapshotChunk_UNKNOWN
  2082. }
  2083. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2084. if m != nil {
  2085. return m.RefetchChunks
  2086. }
  2087. return nil
  2088. }
  2089. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2090. if m != nil {
  2091. return m.RejectSenders
  2092. }
  2093. return nil
  2094. }
  2095. // ConsensusParams contains all consensus-relevant parameters
  2096. // that can be adjusted by the abci app
  2097. type ConsensusParams struct {
  2098. Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
  2099. Evidence *types1.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
  2100. Validator *types1.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"`
  2101. Version *types1.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  2102. }
  2103. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  2104. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  2105. func (*ConsensusParams) ProtoMessage() {}
  2106. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  2107. return fileDescriptor_252557cfdd89a31a, []int{31}
  2108. }
  2109. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  2110. return m.Unmarshal(b)
  2111. }
  2112. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2113. if deterministic {
  2114. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  2115. } else {
  2116. b = b[:cap(b)]
  2117. n, err := m.MarshalToSizedBuffer(b)
  2118. if err != nil {
  2119. return nil, err
  2120. }
  2121. return b[:n], nil
  2122. }
  2123. }
  2124. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  2125. xxx_messageInfo_ConsensusParams.Merge(m, src)
  2126. }
  2127. func (m *ConsensusParams) XXX_Size() int {
  2128. return m.Size()
  2129. }
  2130. func (m *ConsensusParams) XXX_DiscardUnknown() {
  2131. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  2132. }
  2133. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  2134. func (m *ConsensusParams) GetBlock() *BlockParams {
  2135. if m != nil {
  2136. return m.Block
  2137. }
  2138. return nil
  2139. }
  2140. func (m *ConsensusParams) GetEvidence() *types1.EvidenceParams {
  2141. if m != nil {
  2142. return m.Evidence
  2143. }
  2144. return nil
  2145. }
  2146. func (m *ConsensusParams) GetValidator() *types1.ValidatorParams {
  2147. if m != nil {
  2148. return m.Validator
  2149. }
  2150. return nil
  2151. }
  2152. func (m *ConsensusParams) GetVersion() *types1.VersionParams {
  2153. if m != nil {
  2154. return m.Version
  2155. }
  2156. return nil
  2157. }
  2158. // BlockParams contains limits on the block size.
  2159. type BlockParams struct {
  2160. // Note: must be greater than 0
  2161. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  2162. // Note: must be greater or equal to -1
  2163. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  2164. }
  2165. func (m *BlockParams) Reset() { *m = BlockParams{} }
  2166. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  2167. func (*BlockParams) ProtoMessage() {}
  2168. func (*BlockParams) Descriptor() ([]byte, []int) {
  2169. return fileDescriptor_252557cfdd89a31a, []int{32}
  2170. }
  2171. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  2172. return m.Unmarshal(b)
  2173. }
  2174. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2175. if deterministic {
  2176. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  2177. } else {
  2178. b = b[:cap(b)]
  2179. n, err := m.MarshalToSizedBuffer(b)
  2180. if err != nil {
  2181. return nil, err
  2182. }
  2183. return b[:n], nil
  2184. }
  2185. }
  2186. func (m *BlockParams) XXX_Merge(src proto.Message) {
  2187. xxx_messageInfo_BlockParams.Merge(m, src)
  2188. }
  2189. func (m *BlockParams) XXX_Size() int {
  2190. return m.Size()
  2191. }
  2192. func (m *BlockParams) XXX_DiscardUnknown() {
  2193. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  2194. }
  2195. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  2196. func (m *BlockParams) GetMaxBytes() int64 {
  2197. if m != nil {
  2198. return m.MaxBytes
  2199. }
  2200. return 0
  2201. }
  2202. func (m *BlockParams) GetMaxGas() int64 {
  2203. if m != nil {
  2204. return m.MaxGas
  2205. }
  2206. return 0
  2207. }
  2208. type LastCommitInfo struct {
  2209. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2210. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2211. }
  2212. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2213. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2214. func (*LastCommitInfo) ProtoMessage() {}
  2215. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2216. return fileDescriptor_252557cfdd89a31a, []int{33}
  2217. }
  2218. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2219. return m.Unmarshal(b)
  2220. }
  2221. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2222. if deterministic {
  2223. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2224. } else {
  2225. b = b[:cap(b)]
  2226. n, err := m.MarshalToSizedBuffer(b)
  2227. if err != nil {
  2228. return nil, err
  2229. }
  2230. return b[:n], nil
  2231. }
  2232. }
  2233. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2234. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2235. }
  2236. func (m *LastCommitInfo) XXX_Size() int {
  2237. return m.Size()
  2238. }
  2239. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2240. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2241. }
  2242. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2243. func (m *LastCommitInfo) GetRound() int32 {
  2244. if m != nil {
  2245. return m.Round
  2246. }
  2247. return 0
  2248. }
  2249. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2250. if m != nil {
  2251. return m.Votes
  2252. }
  2253. return nil
  2254. }
  2255. // Event allows application developers to attach additional information to
  2256. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2257. // Later, transactions may be queried using these events.
  2258. type Event struct {
  2259. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2260. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2261. }
  2262. func (m *Event) Reset() { *m = Event{} }
  2263. func (m *Event) String() string { return proto.CompactTextString(m) }
  2264. func (*Event) ProtoMessage() {}
  2265. func (*Event) Descriptor() ([]byte, []int) {
  2266. return fileDescriptor_252557cfdd89a31a, []int{34}
  2267. }
  2268. func (m *Event) XXX_Unmarshal(b []byte) error {
  2269. return m.Unmarshal(b)
  2270. }
  2271. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2272. if deterministic {
  2273. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2274. } else {
  2275. b = b[:cap(b)]
  2276. n, err := m.MarshalToSizedBuffer(b)
  2277. if err != nil {
  2278. return nil, err
  2279. }
  2280. return b[:n], nil
  2281. }
  2282. }
  2283. func (m *Event) XXX_Merge(src proto.Message) {
  2284. xxx_messageInfo_Event.Merge(m, src)
  2285. }
  2286. func (m *Event) XXX_Size() int {
  2287. return m.Size()
  2288. }
  2289. func (m *Event) XXX_DiscardUnknown() {
  2290. xxx_messageInfo_Event.DiscardUnknown(m)
  2291. }
  2292. var xxx_messageInfo_Event proto.InternalMessageInfo
  2293. func (m *Event) GetType() string {
  2294. if m != nil {
  2295. return m.Type
  2296. }
  2297. return ""
  2298. }
  2299. func (m *Event) GetAttributes() []EventAttribute {
  2300. if m != nil {
  2301. return m.Attributes
  2302. }
  2303. return nil
  2304. }
  2305. // EventAttribute is a single key-value pair, associated with an event.
  2306. type EventAttribute struct {
  2307. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2308. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2309. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2310. }
  2311. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2312. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2313. func (*EventAttribute) ProtoMessage() {}
  2314. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2315. return fileDescriptor_252557cfdd89a31a, []int{35}
  2316. }
  2317. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2318. return m.Unmarshal(b)
  2319. }
  2320. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2321. if deterministic {
  2322. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2323. } else {
  2324. b = b[:cap(b)]
  2325. n, err := m.MarshalToSizedBuffer(b)
  2326. if err != nil {
  2327. return nil, err
  2328. }
  2329. return b[:n], nil
  2330. }
  2331. }
  2332. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2333. xxx_messageInfo_EventAttribute.Merge(m, src)
  2334. }
  2335. func (m *EventAttribute) XXX_Size() int {
  2336. return m.Size()
  2337. }
  2338. func (m *EventAttribute) XXX_DiscardUnknown() {
  2339. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2340. }
  2341. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2342. func (m *EventAttribute) GetKey() []byte {
  2343. if m != nil {
  2344. return m.Key
  2345. }
  2346. return nil
  2347. }
  2348. func (m *EventAttribute) GetValue() []byte {
  2349. if m != nil {
  2350. return m.Value
  2351. }
  2352. return nil
  2353. }
  2354. func (m *EventAttribute) GetIndex() bool {
  2355. if m != nil {
  2356. return m.Index
  2357. }
  2358. return false
  2359. }
  2360. // TxResult contains results of executing the transaction.
  2361. //
  2362. // One usage is indexing transaction results.
  2363. type TxResult struct {
  2364. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2365. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2366. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2367. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2368. }
  2369. func (m *TxResult) Reset() { *m = TxResult{} }
  2370. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2371. func (*TxResult) ProtoMessage() {}
  2372. func (*TxResult) Descriptor() ([]byte, []int) {
  2373. return fileDescriptor_252557cfdd89a31a, []int{36}
  2374. }
  2375. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2376. return m.Unmarshal(b)
  2377. }
  2378. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2379. if deterministic {
  2380. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2381. } else {
  2382. b = b[:cap(b)]
  2383. n, err := m.MarshalToSizedBuffer(b)
  2384. if err != nil {
  2385. return nil, err
  2386. }
  2387. return b[:n], nil
  2388. }
  2389. }
  2390. func (m *TxResult) XXX_Merge(src proto.Message) {
  2391. xxx_messageInfo_TxResult.Merge(m, src)
  2392. }
  2393. func (m *TxResult) XXX_Size() int {
  2394. return m.Size()
  2395. }
  2396. func (m *TxResult) XXX_DiscardUnknown() {
  2397. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2398. }
  2399. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2400. func (m *TxResult) GetHeight() int64 {
  2401. if m != nil {
  2402. return m.Height
  2403. }
  2404. return 0
  2405. }
  2406. func (m *TxResult) GetIndex() uint32 {
  2407. if m != nil {
  2408. return m.Index
  2409. }
  2410. return 0
  2411. }
  2412. func (m *TxResult) GetTx() []byte {
  2413. if m != nil {
  2414. return m.Tx
  2415. }
  2416. return nil
  2417. }
  2418. func (m *TxResult) GetResult() ResponseDeliverTx {
  2419. if m != nil {
  2420. return m.Result
  2421. }
  2422. return ResponseDeliverTx{}
  2423. }
  2424. // Validator
  2425. type Validator struct {
  2426. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2427. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2428. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2429. }
  2430. func (m *Validator) Reset() { *m = Validator{} }
  2431. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2432. func (*Validator) ProtoMessage() {}
  2433. func (*Validator) Descriptor() ([]byte, []int) {
  2434. return fileDescriptor_252557cfdd89a31a, []int{37}
  2435. }
  2436. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2437. return m.Unmarshal(b)
  2438. }
  2439. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2440. if deterministic {
  2441. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2442. } else {
  2443. b = b[:cap(b)]
  2444. n, err := m.MarshalToSizedBuffer(b)
  2445. if err != nil {
  2446. return nil, err
  2447. }
  2448. return b[:n], nil
  2449. }
  2450. }
  2451. func (m *Validator) XXX_Merge(src proto.Message) {
  2452. xxx_messageInfo_Validator.Merge(m, src)
  2453. }
  2454. func (m *Validator) XXX_Size() int {
  2455. return m.Size()
  2456. }
  2457. func (m *Validator) XXX_DiscardUnknown() {
  2458. xxx_messageInfo_Validator.DiscardUnknown(m)
  2459. }
  2460. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2461. func (m *Validator) GetAddress() []byte {
  2462. if m != nil {
  2463. return m.Address
  2464. }
  2465. return nil
  2466. }
  2467. func (m *Validator) GetPower() int64 {
  2468. if m != nil {
  2469. return m.Power
  2470. }
  2471. return 0
  2472. }
  2473. // ValidatorUpdate
  2474. type ValidatorUpdate struct {
  2475. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2476. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2477. }
  2478. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2479. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2480. func (*ValidatorUpdate) ProtoMessage() {}
  2481. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2482. return fileDescriptor_252557cfdd89a31a, []int{38}
  2483. }
  2484. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2485. return m.Unmarshal(b)
  2486. }
  2487. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2488. if deterministic {
  2489. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2490. } else {
  2491. b = b[:cap(b)]
  2492. n, err := m.MarshalToSizedBuffer(b)
  2493. if err != nil {
  2494. return nil, err
  2495. }
  2496. return b[:n], nil
  2497. }
  2498. }
  2499. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2500. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2501. }
  2502. func (m *ValidatorUpdate) XXX_Size() int {
  2503. return m.Size()
  2504. }
  2505. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2506. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2507. }
  2508. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2509. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2510. if m != nil {
  2511. return m.PubKey
  2512. }
  2513. return crypto.PublicKey{}
  2514. }
  2515. func (m *ValidatorUpdate) GetPower() int64 {
  2516. if m != nil {
  2517. return m.Power
  2518. }
  2519. return 0
  2520. }
  2521. // VoteInfo
  2522. type VoteInfo struct {
  2523. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2524. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2525. }
  2526. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2527. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2528. func (*VoteInfo) ProtoMessage() {}
  2529. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2530. return fileDescriptor_252557cfdd89a31a, []int{39}
  2531. }
  2532. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2533. return m.Unmarshal(b)
  2534. }
  2535. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2536. if deterministic {
  2537. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2538. } else {
  2539. b = b[:cap(b)]
  2540. n, err := m.MarshalToSizedBuffer(b)
  2541. if err != nil {
  2542. return nil, err
  2543. }
  2544. return b[:n], nil
  2545. }
  2546. }
  2547. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2548. xxx_messageInfo_VoteInfo.Merge(m, src)
  2549. }
  2550. func (m *VoteInfo) XXX_Size() int {
  2551. return m.Size()
  2552. }
  2553. func (m *VoteInfo) XXX_DiscardUnknown() {
  2554. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2555. }
  2556. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2557. func (m *VoteInfo) GetValidator() Validator {
  2558. if m != nil {
  2559. return m.Validator
  2560. }
  2561. return Validator{}
  2562. }
  2563. func (m *VoteInfo) GetSignedLastBlock() bool {
  2564. if m != nil {
  2565. return m.SignedLastBlock
  2566. }
  2567. return false
  2568. }
  2569. type Evidence struct {
  2570. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2571. // The offending validator
  2572. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2573. // The height when the offense occurred
  2574. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2575. // The corresponding time where the offense occurred
  2576. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2577. // Total voting power of the validator set in case the ABCI application does
  2578. // not store historical validators.
  2579. // https://github.com/tendermint/tendermint/issues/4581
  2580. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2581. }
  2582. func (m *Evidence) Reset() { *m = Evidence{} }
  2583. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2584. func (*Evidence) ProtoMessage() {}
  2585. func (*Evidence) Descriptor() ([]byte, []int) {
  2586. return fileDescriptor_252557cfdd89a31a, []int{40}
  2587. }
  2588. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2589. return m.Unmarshal(b)
  2590. }
  2591. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2592. if deterministic {
  2593. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2594. } else {
  2595. b = b[:cap(b)]
  2596. n, err := m.MarshalToSizedBuffer(b)
  2597. if err != nil {
  2598. return nil, err
  2599. }
  2600. return b[:n], nil
  2601. }
  2602. }
  2603. func (m *Evidence) XXX_Merge(src proto.Message) {
  2604. xxx_messageInfo_Evidence.Merge(m, src)
  2605. }
  2606. func (m *Evidence) XXX_Size() int {
  2607. return m.Size()
  2608. }
  2609. func (m *Evidence) XXX_DiscardUnknown() {
  2610. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2611. }
  2612. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2613. func (m *Evidence) GetType() EvidenceType {
  2614. if m != nil {
  2615. return m.Type
  2616. }
  2617. return EvidenceType_UNKNOWN
  2618. }
  2619. func (m *Evidence) GetValidator() Validator {
  2620. if m != nil {
  2621. return m.Validator
  2622. }
  2623. return Validator{}
  2624. }
  2625. func (m *Evidence) GetHeight() int64 {
  2626. if m != nil {
  2627. return m.Height
  2628. }
  2629. return 0
  2630. }
  2631. func (m *Evidence) GetTime() time.Time {
  2632. if m != nil {
  2633. return m.Time
  2634. }
  2635. return time.Time{}
  2636. }
  2637. func (m *Evidence) GetTotalVotingPower() int64 {
  2638. if m != nil {
  2639. return m.TotalVotingPower
  2640. }
  2641. return 0
  2642. }
  2643. type Snapshot struct {
  2644. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2645. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2646. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2647. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2648. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2649. }
  2650. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2651. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2652. func (*Snapshot) ProtoMessage() {}
  2653. func (*Snapshot) Descriptor() ([]byte, []int) {
  2654. return fileDescriptor_252557cfdd89a31a, []int{41}
  2655. }
  2656. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2657. return m.Unmarshal(b)
  2658. }
  2659. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2660. if deterministic {
  2661. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2662. } else {
  2663. b = b[:cap(b)]
  2664. n, err := m.MarshalToSizedBuffer(b)
  2665. if err != nil {
  2666. return nil, err
  2667. }
  2668. return b[:n], nil
  2669. }
  2670. }
  2671. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2672. xxx_messageInfo_Snapshot.Merge(m, src)
  2673. }
  2674. func (m *Snapshot) XXX_Size() int {
  2675. return m.Size()
  2676. }
  2677. func (m *Snapshot) XXX_DiscardUnknown() {
  2678. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2679. }
  2680. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2681. func (m *Snapshot) GetHeight() uint64 {
  2682. if m != nil {
  2683. return m.Height
  2684. }
  2685. return 0
  2686. }
  2687. func (m *Snapshot) GetFormat() uint32 {
  2688. if m != nil {
  2689. return m.Format
  2690. }
  2691. return 0
  2692. }
  2693. func (m *Snapshot) GetChunks() uint32 {
  2694. if m != nil {
  2695. return m.Chunks
  2696. }
  2697. return 0
  2698. }
  2699. func (m *Snapshot) GetHash() []byte {
  2700. if m != nil {
  2701. return m.Hash
  2702. }
  2703. return nil
  2704. }
  2705. func (m *Snapshot) GetMetadata() []byte {
  2706. if m != nil {
  2707. return m.Metadata
  2708. }
  2709. return nil
  2710. }
  2711. func init() {
  2712. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2713. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2714. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2715. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2716. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2717. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2718. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2719. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2720. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2721. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2722. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2723. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2724. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2725. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2726. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2727. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2728. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2729. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2730. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2731. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2732. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2733. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2734. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2735. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2736. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2737. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2738. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2739. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2740. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2741. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2742. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2743. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2744. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2745. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2746. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2747. proto.RegisterType((*ConsensusParams)(nil), "tendermint.abci.ConsensusParams")
  2748. proto.RegisterType((*BlockParams)(nil), "tendermint.abci.BlockParams")
  2749. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2750. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2751. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2752. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2753. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2754. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2755. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2756. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2757. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2758. }
  2759. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2760. var fileDescriptor_252557cfdd89a31a = []byte{
  2761. // 2691 bytes of a gzipped FileDescriptorProto
  2762. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7,
  2763. 0x11, 0xc6, 0xe2, 0xbd, 0x0d, 0xe2, 0xc1, 0x11, 0x2d, 0xc3, 0xb0, 0x4c, 0x4a, 0xab, 0x92, 0x63,
  2764. 0xc9, 0x36, 0x19, 0x53, 0x25, 0x45, 0x2a, 0x3b, 0xb1, 0x09, 0x08, 0x32, 0x68, 0x32, 0x24, 0xb3,
  2765. 0x84, 0xe4, 0xbc, 0xac, 0xf5, 0x02, 0x3b, 0x04, 0xd6, 0x02, 0x76, 0xd7, 0xd8, 0x01, 0x45, 0xfa,
  2766. 0x98, 0xc7, 0x45, 0xb9, 0xe8, 0x98, 0x8b, 0xab, 0xf2, 0x0f, 0x72, 0xcd, 0x29, 0x97, 0x5c, 0x5c,
  2767. 0x95, 0x4a, 0x95, 0x8f, 0x39, 0x39, 0x29, 0xe9, 0x96, 0x3f, 0x90, 0x53, 0x2a, 0xa9, 0x79, 0xec,
  2768. 0x0b, 0xc0, 0x12, 0x60, 0x9c, 0x5b, 0x6e, 0x3b, 0xbd, 0xdd, 0x8d, 0x99, 0xde, 0xe9, 0xaf, 0xbf,
  2769. 0xe9, 0x01, 0xbc, 0x4a, 0xb0, 0x65, 0xe0, 0xd1, 0xd0, 0xb4, 0xc8, 0x86, 0xde, 0xe9, 0x9a, 0x1b,
  2770. 0xe4, 0xd4, 0xc1, 0xee, 0xba, 0x33, 0xb2, 0x89, 0x8d, 0xca, 0xc1, 0xcb, 0x75, 0xfa, 0xb2, 0xf6,
  2771. 0x5a, 0x48, 0xbb, 0x3b, 0x3a, 0x75, 0x88, 0xbd, 0xe1, 0x8c, 0x6c, 0xfb, 0x88, 0xeb, 0xd7, 0x2e,
  2772. 0x85, 0x5e, 0x33, 0x3f, 0x61, 0x6f, 0x91, 0xb7, 0xc2, 0xf8, 0x31, 0x3e, 0xf5, 0xde, 0xbe, 0x36,
  2773. 0x65, 0xeb, 0xe8, 0x23, 0x7d, 0xe8, 0xbd, 0x5e, 0xeb, 0xd9, 0x76, 0x6f, 0x80, 0x37, 0xd8, 0xa8,
  2774. 0x33, 0x3e, 0xda, 0x20, 0xe6, 0x10, 0xbb, 0x44, 0x1f, 0x3a, 0x42, 0x61, 0xa5, 0x67, 0xf7, 0x6c,
  2775. 0xf6, 0xb8, 0x41, 0x9f, 0xb8, 0x54, 0xf9, 0x4b, 0x0e, 0x72, 0x2a, 0xfe, 0x7c, 0x8c, 0x5d, 0x82,
  2776. 0x36, 0x21, 0x8d, 0xbb, 0x7d, 0xbb, 0x2a, 0x5d, 0x96, 0xde, 0x28, 0x6c, 0x5e, 0x5a, 0x9f, 0x58,
  2777. 0xdc, 0xba, 0xd0, 0x6b, 0x76, 0xfb, 0x76, 0x2b, 0xa1, 0x32, 0x5d, 0x74, 0x0b, 0x32, 0x47, 0x83,
  2778. 0xb1, 0xdb, 0xaf, 0x26, 0x99, 0xd1, 0x6b, 0x71, 0x46, 0xf7, 0xa9, 0x52, 0x2b, 0xa1, 0x72, 0x6d,
  2779. 0xfa, 0x53, 0xa6, 0x75, 0x64, 0x57, 0x53, 0x67, 0xff, 0xd4, 0xb6, 0x75, 0xc4, 0x7e, 0x8a, 0xea,
  2780. 0xa2, 0x3a, 0x80, 0x69, 0x99, 0x44, 0xeb, 0xf6, 0x75, 0xd3, 0xaa, 0xa6, 0x99, 0xe5, 0x95, 0x78,
  2781. 0x4b, 0x93, 0x34, 0xa8, 0x62, 0x2b, 0xa1, 0xca, 0xa6, 0x37, 0xa0, 0xd3, 0xfd, 0x7c, 0x8c, 0x47,
  2782. 0xa7, 0xd5, 0xcc, 0xd9, 0xd3, 0xfd, 0x11, 0x55, 0xa2, 0xd3, 0x65, 0xda, 0xa8, 0x09, 0x85, 0x0e,
  2783. 0xee, 0x99, 0x96, 0xd6, 0x19, 0xd8, 0xdd, 0xc7, 0xd5, 0x2c, 0x33, 0x56, 0xe2, 0x8c, 0xeb, 0x54,
  2784. 0xb5, 0x4e, 0x35, 0x5b, 0x09, 0x15, 0x3a, 0xfe, 0x08, 0xbd, 0x07, 0xf9, 0x6e, 0x1f, 0x77, 0x1f,
  2785. 0x6b, 0xe4, 0xa4, 0x9a, 0x63, 0x3e, 0xd6, 0xe2, 0x7c, 0x34, 0xa8, 0x5e, 0xfb, 0xa4, 0x95, 0x50,
  2786. 0x73, 0x5d, 0xfe, 0x48, 0xd7, 0x6f, 0xe0, 0x81, 0x79, 0x8c, 0x47, 0xd4, 0x3e, 0x7f, 0xf6, 0xfa,
  2787. 0xef, 0x71, 0x4d, 0xe6, 0x41, 0x36, 0xbc, 0x01, 0x7a, 0x1f, 0x64, 0x6c, 0x19, 0x62, 0x19, 0x32,
  2788. 0x73, 0x71, 0x39, 0xf6, 0x3b, 0x5b, 0x86, 0xb7, 0x88, 0x3c, 0x16, 0xcf, 0xe8, 0x0e, 0x64, 0xbb,
  2789. 0xf6, 0x70, 0x68, 0x92, 0x2a, 0x30, 0xeb, 0xd5, 0xd8, 0x05, 0x30, 0xad, 0x56, 0x42, 0x15, 0xfa,
  2790. 0x68, 0x0f, 0x4a, 0x03, 0xd3, 0x25, 0x9a, 0x6b, 0xe9, 0x8e, 0xdb, 0xb7, 0x89, 0x5b, 0x2d, 0x30,
  2791. 0x0f, 0xd7, 0xe2, 0x3c, 0xec, 0x9a, 0x2e, 0x39, 0xf4, 0x94, 0x5b, 0x09, 0xb5, 0x38, 0x08, 0x0b,
  2792. 0xa8, 0x3f, 0xfb, 0xe8, 0x08, 0x8f, 0x7c, 0x87, 0xd5, 0xa5, 0xb3, 0xfd, 0xed, 0x53, 0x6d, 0xcf,
  2793. 0x9e, 0xfa, 0xb3, 0xc3, 0x02, 0xf4, 0x33, 0xb8, 0x30, 0xb0, 0x75, 0xc3, 0x77, 0xa7, 0x75, 0xfb,
  2794. 0x63, 0xeb, 0x71, 0xb5, 0xc8, 0x9c, 0x5e, 0x8f, 0x9d, 0xa4, 0xad, 0x1b, 0x9e, 0x8b, 0x06, 0x35,
  2795. 0x68, 0x25, 0xd4, 0xe5, 0xc1, 0xa4, 0x10, 0x3d, 0x82, 0x15, 0xdd, 0x71, 0x06, 0xa7, 0x93, 0xde,
  2796. 0x4b, 0xcc, 0xfb, 0x8d, 0x38, 0xef, 0x5b, 0xd4, 0x66, 0xd2, 0x3d, 0xd2, 0xa7, 0xa4, 0xf5, 0x1c,
  2797. 0x64, 0x8e, 0xf5, 0xc1, 0x18, 0x2b, 0xdf, 0x81, 0x42, 0x28, 0x4d, 0x51, 0x15, 0x72, 0x43, 0xec,
  2798. 0xba, 0x7a, 0x0f, 0xb3, 0xac, 0x96, 0x55, 0x6f, 0xa8, 0x94, 0x60, 0x29, 0x9c, 0x9a, 0xca, 0x33,
  2799. 0xc9, 0xb7, 0xa4, 0x59, 0x47, 0x2d, 0x8f, 0xf1, 0xc8, 0x35, 0x6d, 0xcb, 0xb3, 0x14, 0x43, 0x74,
  2800. 0x15, 0x8a, 0x6c, 0xff, 0x68, 0xde, 0x7b, 0x9a, 0xfa, 0x69, 0x75, 0x89, 0x09, 0x1f, 0x0a, 0xa5,
  2801. 0x35, 0x28, 0x38, 0x9b, 0x8e, 0xaf, 0x92, 0x62, 0x2a, 0xe0, 0x6c, 0x3a, 0x9e, 0xc2, 0x15, 0x58,
  2802. 0xa2, 0x2b, 0xf5, 0x35, 0xd2, 0xec, 0x47, 0x0a, 0x54, 0x26, 0x54, 0x94, 0x3f, 0x27, 0xa1, 0x32,
  2803. 0x99, 0xce, 0xe8, 0x0e, 0xa4, 0x29, 0xb2, 0x09, 0x90, 0xaa, 0xad, 0x73, 0xd8, 0x5b, 0xf7, 0x60,
  2804. 0x6f, 0xbd, 0xed, 0xc1, 0x5e, 0x3d, 0xff, 0xd5, 0x37, 0x6b, 0x89, 0x67, 0x7f, 0x5b, 0x93, 0x54,
  2805. 0x66, 0x81, 0x5e, 0xa1, 0xd9, 0xa7, 0x9b, 0x96, 0x66, 0x1a, 0x6c, 0xca, 0x32, 0x4d, 0x2d, 0xdd,
  2806. 0xb4, 0xb6, 0x0d, 0xb4, 0x03, 0x95, 0xae, 0x6d, 0xb9, 0xd8, 0x72, 0xc7, 0xae, 0xc6, 0x61, 0x55,
  2807. 0x40, 0xd3, 0x74, 0x76, 0x34, 0x3c, 0xc5, 0x03, 0xa6, 0xa7, 0x96, 0xbb, 0x51, 0x01, 0xba, 0x0f,
  2808. 0x70, 0xac, 0x0f, 0x4c, 0x43, 0x27, 0xf6, 0xc8, 0xad, 0xa6, 0x2f, 0xa7, 0x66, 0xba, 0x79, 0xe8,
  2809. 0xa9, 0x3c, 0x70, 0x0c, 0x9d, 0xe0, 0x7a, 0x9a, 0xce, 0x56, 0x0d, 0x59, 0xa2, 0xd7, 0xa1, 0xac,
  2810. 0x3b, 0x8e, 0xe6, 0x12, 0x9d, 0x60, 0xad, 0x73, 0x4a, 0xb0, 0xcb, 0x50, 0x6b, 0x49, 0x2d, 0xea,
  2811. 0x8e, 0x73, 0x48, 0xa5, 0x75, 0x2a, 0x44, 0xd7, 0xa0, 0x44, 0x01, 0xce, 0xd4, 0x07, 0x5a, 0x1f,
  2812. 0x9b, 0xbd, 0x3e, 0x61, 0xf8, 0x94, 0x52, 0x8b, 0x42, 0xda, 0x62, 0x42, 0xc5, 0xf0, 0x3f, 0x38,
  2813. 0x03, 0x37, 0x84, 0x20, 0x6d, 0xe8, 0x44, 0x67, 0x81, 0x5c, 0x52, 0xd9, 0x33, 0x95, 0x39, 0x3a,
  2814. 0xe9, 0x8b, 0xf0, 0xb0, 0x67, 0x74, 0x11, 0xb2, 0xc2, 0x6d, 0x8a, 0xb9, 0x15, 0x23, 0xb4, 0x02,
  2815. 0x19, 0x67, 0x64, 0x1f, 0x63, 0xf6, 0xe5, 0xf2, 0x2a, 0x1f, 0x28, 0xbf, 0x4a, 0xc2, 0xf2, 0x14,
  2816. 0x0c, 0x52, 0xbf, 0x7d, 0xdd, 0xed, 0x7b, 0xbf, 0x45, 0x9f, 0xd1, 0x6d, 0xea, 0x57, 0x37, 0xf0,
  2817. 0x48, 0x94, 0x8e, 0x6a, 0x38, 0x44, 0xbc, 0x2c, 0xb6, 0xd8, 0x7b, 0x11, 0x1a, 0xa1, 0x8d, 0xf6,
  2818. 0xa1, 0x32, 0xd0, 0x5d, 0xa2, 0x71, 0x58, 0xd1, 0x42, 0x65, 0x64, 0x1a, 0x4c, 0x77, 0x75, 0x0f,
  2819. 0x88, 0xe8, 0x9e, 0x16, 0x8e, 0x4a, 0x83, 0x88, 0x14, 0xa9, 0xb0, 0xd2, 0x39, 0xfd, 0x42, 0xb7,
  2820. 0x88, 0x69, 0x61, 0x6d, 0xea, 0xcb, 0xbd, 0x32, 0xe5, 0xb4, 0x79, 0x6c, 0x1a, 0xd8, 0xea, 0x7a,
  2821. 0x9f, 0xec, 0x82, 0x6f, 0xec, 0x7f, 0x52, 0x57, 0x51, 0xa1, 0x14, 0x05, 0x72, 0x54, 0x82, 0x24,
  2822. 0x39, 0x11, 0x01, 0x48, 0x92, 0x13, 0xf4, 0x5d, 0x48, 0xd3, 0x45, 0xb2, 0xc5, 0x97, 0x66, 0x54,
  2823. 0x40, 0x61, 0xd7, 0x3e, 0x75, 0xb0, 0xca, 0x34, 0x15, 0xc5, 0xcf, 0x06, 0x1f, 0xdc, 0x27, 0xbd,
  2824. 0x2a, 0xd7, 0xa1, 0x3c, 0x81, 0xde, 0xa1, 0xef, 0x27, 0x85, 0xbf, 0x9f, 0x52, 0x86, 0x62, 0x04,
  2825. 0xaa, 0x95, 0x8b, 0xb0, 0x32, 0x0b, 0x79, 0x95, 0xbe, 0x2f, 0x8f, 0x20, 0x28, 0xba, 0x05, 0x79,
  2826. 0x1f, 0x7a, 0x79, 0x36, 0x4e, 0xc7, 0xca, 0x53, 0x56, 0x7d, 0x55, 0x9a, 0x86, 0x74, 0x5b, 0xb3,
  2827. 0xfd, 0x90, 0x64, 0x13, 0xcf, 0xe9, 0x8e, 0xd3, 0xd2, 0xdd, 0xbe, 0xf2, 0x29, 0x54, 0xe3, 0x60,
  2828. 0x75, 0x62, 0x19, 0x69, 0x7f, 0x1b, 0x5e, 0x84, 0xec, 0x91, 0x3d, 0x1a, 0xea, 0x84, 0x39, 0x2b,
  2829. 0xaa, 0x62, 0x44, 0xb7, 0x27, 0x87, 0xd8, 0x14, 0x13, 0xf3, 0x81, 0xa2, 0xc1, 0x2b, 0xb1, 0xd0,
  2830. 0x4a, 0x4d, 0x4c, 0xcb, 0xc0, 0x3c, 0x9e, 0x45, 0x95, 0x0f, 0x02, 0x47, 0x7c, 0xb2, 0x7c, 0x40,
  2831. 0x7f, 0xd6, 0x65, 0x6b, 0x65, 0xfe, 0x65, 0x55, 0x8c, 0x94, 0xdf, 0xe5, 0x21, 0xaf, 0x62, 0xd7,
  2832. 0xa1, 0x98, 0x80, 0xea, 0x20, 0xe3, 0x93, 0x2e, 0x76, 0x88, 0x87, 0xa2, 0xb3, 0x49, 0x03, 0xd7,
  2833. 0x6e, 0x7a, 0x9a, 0xb4, 0x62, 0xfb, 0x66, 0xe8, 0xa6, 0x20, 0x65, 0xf1, 0xfc, 0x4a, 0x98, 0x87,
  2834. 0x59, 0xd9, 0x6d, 0x8f, 0x95, 0xa5, 0x62, 0x8b, 0x34, 0xb7, 0x9a, 0xa0, 0x65, 0x37, 0x05, 0x2d,
  2835. 0x4b, 0xcf, 0xf9, 0xb1, 0x08, 0x2f, 0x6b, 0x44, 0x78, 0x59, 0x66, 0xce, 0x32, 0x63, 0x88, 0xd9,
  2836. 0x6d, 0x8f, 0x98, 0x65, 0xe7, 0xcc, 0x78, 0x82, 0x99, 0xdd, 0x8f, 0x32, 0x33, 0xce, 0xaa, 0xae,
  2837. 0xc6, 0x5a, 0xc7, 0x52, 0xb3, 0xef, 0x87, 0xa8, 0x59, 0x3e, 0x96, 0x17, 0x71, 0x27, 0x33, 0xb8,
  2838. 0x59, 0x23, 0xc2, 0xcd, 0xe4, 0x39, 0x31, 0x88, 0x21, 0x67, 0x1f, 0x84, 0xc9, 0x19, 0xc4, 0xf2,
  2839. 0x3b, 0xf1, 0xbd, 0x67, 0xb1, 0xb3, 0xbb, 0x3e, 0x3b, 0x2b, 0xc4, 0xd2, 0x4b, 0xb1, 0x86, 0x49,
  2840. 0x7a, 0xb6, 0x3f, 0x45, 0xcf, 0x38, 0x9d, 0x7a, 0x3d, 0xd6, 0xc5, 0x1c, 0x7e, 0xb6, 0x3f, 0xc5,
  2841. 0xcf, 0x8a, 0x73, 0x1c, 0xce, 0x21, 0x68, 0x3f, 0x9f, 0x4d, 0xd0, 0xe2, 0x29, 0x94, 0x98, 0xe6,
  2842. 0x62, 0x0c, 0x4d, 0x8b, 0x61, 0x68, 0x65, 0xe6, 0xfe, 0xcd, 0x58, 0xf7, 0xe7, 0xa7, 0x68, 0xd7,
  2843. 0x69, 0x85, 0x9c, 0xc8, 0x79, 0x8a, 0x32, 0x78, 0x34, 0xb2, 0x47, 0x82, 0x6c, 0xf1, 0x81, 0xf2,
  2844. 0x06, 0xad, 0xd9, 0x41, 0x7e, 0x9f, 0x41, 0xe7, 0x18, 0x9a, 0x87, 0x72, 0x5a, 0xf9, 0x83, 0x14,
  2845. 0xd8, 0xb2, 0x32, 0x17, 0xae, 0xf7, 0xb2, 0xa8, 0xf7, 0x21, 0x92, 0x97, 0x8c, 0x92, 0xbc, 0x35,
  2846. 0x28, 0x50, 0x94, 0x9e, 0xe0, 0x6f, 0xba, 0xe3, 0xf3, 0xb7, 0x1b, 0xb0, 0xcc, 0xca, 0x30, 0xa7,
  2847. 0x82, 0x02, 0x9a, 0xd3, 0xac, 0xc2, 0x94, 0xe9, 0x0b, 0xbe, 0x39, 0x39, 0x46, 0xbf, 0x0d, 0x17,
  2848. 0x42, 0xba, 0x3e, 0xfa, 0x73, 0x36, 0x53, 0xf1, 0xb5, 0xb7, 0x44, 0x19, 0xf8, 0x93, 0x14, 0x44,
  2849. 0x28, 0x20, 0x7e, 0xb3, 0x38, 0x9a, 0xf4, 0xbf, 0xe1, 0x68, 0xc9, 0xff, 0x9a, 0xa3, 0x85, 0x8b,
  2850. 0x59, 0x2a, 0x5a, 0xcc, 0xfe, 0x29, 0x05, 0x9f, 0xc4, 0x67, 0x5c, 0x5d, 0xdb, 0xc0, 0xa2, 0xbc,
  2851. 0xb0, 0x67, 0x54, 0x81, 0xd4, 0xc0, 0xee, 0x89, 0x22, 0x42, 0x1f, 0xa9, 0x96, 0x8f, 0xc1, 0xb2,
  2852. 0x80, 0x58, 0xbf, 0x32, 0x65, 0x58, 0x80, 0x45, 0x65, 0xaa, 0x40, 0xea, 0x31, 0xe6, 0x88, 0xb9,
  2853. 0xa4, 0xd2, 0x47, 0xaa, 0xc7, 0xf6, 0x18, 0xc3, 0xc1, 0x25, 0x95, 0x0f, 0xd0, 0x1d, 0x90, 0x59,
  2854. 0x13, 0x42, 0xb3, 0x1d, 0x57, 0x80, 0xdb, 0xab, 0xe1, 0xb5, 0xf2, 0x5e, 0xc3, 0xfa, 0x01, 0xd5,
  2855. 0xd9, 0x77, 0x5c, 0x35, 0xef, 0x88, 0xa7, 0x50, 0xd1, 0x95, 0x23, 0xdc, 0xef, 0x12, 0xc8, 0x74,
  2856. 0xf6, 0xae, 0xa3, 0x77, 0x31, 0x43, 0x2a, 0x59, 0x0d, 0x04, 0xca, 0x23, 0x40, 0xd3, 0x78, 0x8b,
  2857. 0x5a, 0x90, 0xc5, 0xc7, 0xd8, 0x22, 0xf4, 0xab, 0xd1, 0x70, 0x5f, 0x9c, 0x41, 0xac, 0xb0, 0x45,
  2858. 0xea, 0x55, 0x1a, 0xe4, 0x7f, 0x7c, 0xb3, 0x56, 0xe1, 0xda, 0x6f, 0xd9, 0x43, 0x93, 0xe0, 0xa1,
  2859. 0x43, 0x4e, 0x55, 0x61, 0xaf, 0xfc, 0x32, 0x49, 0x59, 0x4e, 0x04, 0x8b, 0x67, 0xc6, 0xd6, 0xdb,
  2860. 0xf1, 0xc9, 0x10, 0xc3, 0x5d, 0x2c, 0xde, 0xab, 0x00, 0x3d, 0xdd, 0xd5, 0x9e, 0xe8, 0x16, 0xc1,
  2861. 0x86, 0x08, 0x7a, 0x48, 0x82, 0x6a, 0x90, 0xa7, 0xa3, 0xb1, 0x8b, 0x0d, 0x41, 0xb6, 0xfd, 0x71,
  2862. 0x68, 0x9d, 0xb9, 0x6f, 0xb7, 0xce, 0x68, 0x94, 0xf3, 0x93, 0x51, 0xfe, 0x75, 0x32, 0xc8, 0x92,
  2863. 0x80, 0x10, 0xfe, 0xff, 0xc5, 0xe1, 0x37, 0xec, 0x94, 0x18, 0x2d, 0x8a, 0xe8, 0x10, 0x96, 0xfd,
  2864. 0x2c, 0xd5, 0xc6, 0x2c, 0x7b, 0xbd, 0x7d, 0xb7, 0x68, 0x9a, 0x57, 0x8e, 0xa3, 0x62, 0x17, 0xfd,
  2865. 0x18, 0x5e, 0x9e, 0x40, 0x20, 0xdf, 0x75, 0x72, 0x41, 0x20, 0x7a, 0x29, 0x0a, 0x44, 0x9e, 0xe7,
  2866. 0x20, 0x56, 0xa9, 0x6f, 0x99, 0x1b, 0xdb, 0xf4, 0xe0, 0x11, 0x2e, 0xf1, 0x33, 0xbf, 0xfe, 0x55,
  2867. 0x28, 0x8e, 0x30, 0xa1, 0x67, 0xe1, 0xc8, 0xd1, 0x6e, 0x89, 0x0b, 0xc5, 0x81, 0xf1, 0x00, 0x5e,
  2868. 0x9a, 0x59, 0xea, 0xd1, 0xf7, 0x40, 0x0e, 0x58, 0x82, 0x14, 0x73, 0x4a, 0xf2, 0x99, 0x7f, 0xa0,
  2869. 0xab, 0xfc, 0x51, 0x0a, 0x5c, 0x46, 0xcf, 0x12, 0x4d, 0xc8, 0x8e, 0xb0, 0x3b, 0x1e, 0x70, 0x76,
  2870. 0x5f, 0xda, 0x7c, 0x7b, 0x31, 0x92, 0x40, 0xa5, 0xe3, 0x01, 0x51, 0x85, 0xb1, 0xf2, 0x08, 0xb2,
  2871. 0x5c, 0x82, 0x0a, 0x90, 0x7b, 0xb0, 0xb7, 0xb3, 0xb7, 0xff, 0xf1, 0x5e, 0x25, 0x81, 0x00, 0xb2,
  2872. 0x5b, 0x8d, 0x46, 0xf3, 0xa0, 0x5d, 0x91, 0x90, 0x0c, 0x99, 0xad, 0xfa, 0xbe, 0xda, 0xae, 0x24,
  2873. 0xa9, 0x58, 0x6d, 0x7e, 0xd4, 0x6c, 0xb4, 0x2b, 0x29, 0xb4, 0x0c, 0x45, 0xfe, 0xac, 0xdd, 0xdf,
  2874. 0x57, 0x7f, 0xb8, 0xd5, 0xae, 0xa4, 0x43, 0xa2, 0xc3, 0xe6, 0xde, 0xbd, 0xa6, 0x5a, 0xc9, 0x28,
  2875. 0xef, 0xd0, 0xe3, 0x43, 0x0c, 0xad, 0x08, 0x0e, 0x0a, 0x52, 0xe8, 0xa0, 0xa0, 0xfc, 0x36, 0x09,
  2876. 0xb5, 0x78, 0xae, 0x80, 0x3e, 0x9a, 0x58, 0xf8, 0xe6, 0x39, 0x88, 0xc6, 0xc4, 0xea, 0xd1, 0x35,
  2877. 0x28, 0x8d, 0xf0, 0x11, 0x26, 0xdd, 0x3e, 0xe7, 0x2e, 0xbc, 0xb0, 0x15, 0xd5, 0xa2, 0x90, 0x32,
  2878. 0x23, 0x97, 0xab, 0x7d, 0x86, 0xbb, 0x44, 0xe3, 0x67, 0x16, 0xbe, 0xe9, 0x64, 0xaa, 0x46, 0xa5,
  2879. 0x87, 0x5c, 0xa8, 0x7c, 0x7a, 0xae, 0x58, 0xca, 0x90, 0x51, 0x9b, 0x6d, 0xf5, 0x27, 0x95, 0x14,
  2880. 0x42, 0x50, 0x62, 0x8f, 0xda, 0xe1, 0xde, 0xd6, 0xc1, 0x61, 0x6b, 0x9f, 0xc6, 0xf2, 0x02, 0x94,
  2881. 0xbd, 0x58, 0x7a, 0xc2, 0x8c, 0xf2, 0x6f, 0x09, 0xca, 0x13, 0x09, 0x82, 0x36, 0x21, 0xc3, 0xf9,
  2882. 0x6f, 0x5c, 0x13, 0x9a, 0xe5, 0xb7, 0xc8, 0x26, 0xae, 0x8a, 0xde, 0x83, 0x3c, 0x16, 0x67, 0xf2,
  2883. 0x59, 0x89, 0xc8, 0x7b, 0x09, 0xde, 0xa9, 0x5d, 0x98, 0xfa, 0x16, 0xe8, 0x7d, 0x90, 0xfd, 0x4c,
  2884. 0x17, 0xe7, 0xa5, 0x2b, 0xd3, 0xe6, 0x3e, 0x46, 0x08, 0xfb, 0xc0, 0x06, 0xdd, 0x0d, 0x48, 0x54,
  2885. 0x7a, 0x9a, 0x75, 0x0b, 0x73, 0xae, 0x20, 0x8c, 0x3d, 0x7d, 0xa5, 0x01, 0x85, 0xd0, 0x7a, 0xd0,
  2886. 0xab, 0x20, 0x0f, 0xf5, 0x13, 0xd1, 0xeb, 0xe1, 0xa7, 0xf5, 0xfc, 0x50, 0x3f, 0xe1, 0x6d, 0x9e,
  2887. 0x97, 0x21, 0x47, 0x5f, 0xf6, 0x74, 0x8e, 0x36, 0x29, 0x35, 0x3b, 0xd4, 0x4f, 0x3e, 0xd4, 0x5d,
  2888. 0xe5, 0x13, 0x28, 0x45, 0xfb, 0x1c, 0x74, 0x27, 0x8e, 0xec, 0xb1, 0x65, 0x30, 0x1f, 0x19, 0x95,
  2889. 0x0f, 0xd0, 0x2d, 0xc8, 0x1c, 0xdb, 0x1c, 0xac, 0x66, 0xa7, 0xec, 0x43, 0x9b, 0xe0, 0x50, 0x9f,
  2890. 0x84, 0x6b, 0x2b, 0x5f, 0x40, 0x86, 0x81, 0x0f, 0x05, 0x12, 0xd6, 0xb1, 0x10, 0x04, 0x92, 0x3e,
  2891. 0xa3, 0x4f, 0x00, 0x74, 0x42, 0x46, 0x66, 0x67, 0x1c, 0x38, 0x5e, 0x9b, 0x0d, 0x5e, 0x5b, 0x9e,
  2892. 0x5e, 0xfd, 0x92, 0x40, 0xb1, 0x95, 0xc0, 0x34, 0x84, 0x64, 0x21, 0x87, 0xca, 0x1e, 0x94, 0xa2,
  2893. 0xb6, 0x1e, 0xe7, 0x91, 0x66, 0x70, 0x9e, 0x64, 0x98, 0xf3, 0xf8, 0x8c, 0x29, 0xc5, 0xbb, 0x53,
  2894. 0x6c, 0xa0, 0x3c, 0x95, 0x20, 0xdf, 0x3e, 0x11, 0xdb, 0x3a, 0xa6, 0x31, 0x12, 0x98, 0x26, 0xc3,
  2895. 0x6d, 0x00, 0xde, 0x69, 0x49, 0xf9, 0xfd, 0x9b, 0x0f, 0xfc, 0xc4, 0x4d, 0x2f, 0x7a, 0xda, 0xf3,
  2896. 0x1a, 0x59, 0x02, 0xac, 0xde, 0x05, 0xd9, 0xdf, 0x55, 0x94, 0x89, 0xeb, 0x86, 0x31, 0xc2, 0xae,
  2897. 0x2b, 0xd6, 0xe6, 0x0d, 0x59, 0x9f, 0xcd, 0x7e, 0x22, 0x1a, 0x0d, 0x29, 0x95, 0x0f, 0x14, 0x03,
  2898. 0xca, 0x13, 0x65, 0x0b, 0xbd, 0x0b, 0x39, 0x67, 0xdc, 0xd1, 0xbc, 0xf0, 0x4c, 0x24, 0x8f, 0x47,
  2899. 0xf2, 0xc6, 0x9d, 0x81, 0xd9, 0xdd, 0xc1, 0xa7, 0xde, 0x64, 0x9c, 0x71, 0x67, 0x87, 0x47, 0x91,
  2900. 0xff, 0x4a, 0x32, 0xfc, 0x2b, 0xc7, 0x90, 0xf7, 0x36, 0x05, 0xfa, 0x41, 0x38, 0x4f, 0xbc, 0xee,
  2901. 0x6b, 0x6c, 0x29, 0x15, 0xee, 0x43, 0x69, 0x72, 0x03, 0x96, 0x5d, 0xb3, 0x67, 0x61, 0x43, 0x0b,
  2902. 0xce, 0x02, 0xec, 0xd7, 0xf2, 0x6a, 0x99, 0xbf, 0xd8, 0xf5, 0x0e, 0x02, 0xca, 0xbf, 0x24, 0xc8,
  2903. 0x7b, 0x09, 0x8b, 0xde, 0x09, 0xed, 0xbb, 0xd2, 0x8c, 0xa6, 0x84, 0xa7, 0x18, 0xb4, 0xca, 0xa2,
  2904. 0x73, 0x4d, 0x9e, 0x7f, 0xae, 0x71, 0x3d, 0x4f, 0xaf, 0xf9, 0x9c, 0x3e, 0x77, 0xf3, 0xf9, 0x2d,
  2905. 0x40, 0xc4, 0x26, 0xfa, 0x40, 0x3b, 0xb6, 0x89, 0x69, 0xf5, 0x34, 0x1e, 0x6c, 0xce, 0xa8, 0x2a,
  2906. 0xec, 0xcd, 0x43, 0xf6, 0xe2, 0x80, 0xc5, 0xfd, 0x17, 0x12, 0xe4, 0xfd, 0xda, 0x78, 0xde, 0xce,
  2907. 0xd7, 0x45, 0xc8, 0x0a, 0xf8, 0xe7, 0xad, 0x2f, 0x31, 0xf2, 0x9b, 0xb0, 0xe9, 0x50, 0x13, 0xb6,
  2908. 0x06, 0xf9, 0x21, 0x26, 0x3a, 0x23, 0x08, 0xfc, 0x38, 0xe6, 0x8f, 0x6f, 0xdc, 0x85, 0x42, 0xa8,
  2909. 0x09, 0x49, 0x33, 0x6f, 0xaf, 0xf9, 0x71, 0x25, 0x51, 0xcb, 0x3d, 0xfd, 0xf2, 0x72, 0x6a, 0x0f,
  2910. 0x3f, 0xa1, 0x7b, 0x56, 0x6d, 0x36, 0x5a, 0xcd, 0xc6, 0x4e, 0x45, 0xaa, 0x15, 0x9e, 0x7e, 0x79,
  2911. 0x39, 0xa7, 0x62, 0xd6, 0x10, 0xb9, 0xd1, 0x82, 0xa5, 0xf0, 0x57, 0x89, 0x56, 0x10, 0x04, 0xa5,
  2912. 0x7b, 0x0f, 0x0e, 0x76, 0xb7, 0x1b, 0x5b, 0xed, 0xa6, 0xf6, 0x70, 0xbf, 0xdd, 0xac, 0x48, 0xe8,
  2913. 0x65, 0xb8, 0xb0, 0xbb, 0xfd, 0x61, 0xab, 0xad, 0x35, 0x76, 0xb7, 0x9b, 0x7b, 0x6d, 0x6d, 0xab,
  2914. 0xdd, 0xde, 0x6a, 0xec, 0x54, 0x92, 0x9b, 0xbf, 0x97, 0xa1, 0xbc, 0x55, 0x6f, 0x6c, 0xd3, 0xea,
  2915. 0x67, 0x76, 0x75, 0x76, 0x56, 0x6e, 0x40, 0x9a, 0x9d, 0x86, 0xcf, 0xbc, 0xa1, 0xac, 0x9d, 0xdd,
  2916. 0x2a, 0x43, 0xf7, 0x21, 0xc3, 0x0e, 0xca, 0xe8, 0xec, 0x2b, 0xcb, 0xda, 0x9c, 0xde, 0x19, 0x9d,
  2917. 0x0c, 0x4b, 0x8f, 0x33, 0xef, 0x30, 0x6b, 0x67, 0xb7, 0xd2, 0x90, 0x0a, 0x72, 0x40, 0xe1, 0xe7,
  2918. 0xdf, 0xe9, 0xd5, 0x16, 0x00, 0x1b, 0xb4, 0x0b, 0x39, 0xef, 0x70, 0x34, 0xef, 0x96, 0xb1, 0x36,
  2919. 0xb7, 0xd7, 0x45, 0xc3, 0xc5, 0x0f, 0xb1, 0x67, 0x5f, 0x99, 0xd6, 0xe6, 0x34, 0xee, 0xd0, 0x36,
  2920. 0x64, 0x05, 0x2f, 0x9d, 0x73, 0x73, 0x58, 0x9b, 0xd7, 0xbb, 0xa2, 0x41, 0x0b, 0xba, 0x03, 0xf3,
  2921. 0x2f, 0x82, 0x6b, 0x0b, 0xf4, 0x24, 0xd1, 0x03, 0x80, 0xd0, 0x91, 0x75, 0x81, 0x1b, 0xde, 0xda,
  2922. 0x22, 0xbd, 0x46, 0xb4, 0x0f, 0x79, 0xff, 0x68, 0x32, 0xf7, 0xbe, 0xb5, 0x36, 0xbf, 0xe9, 0x87,
  2923. 0x1e, 0x41, 0x31, 0xca, 0xc9, 0x17, 0xbb, 0x45, 0xad, 0x2d, 0xd8, 0xcd, 0xa3, 0xfe, 0xa3, 0x04,
  2924. 0x7d, 0xb1, 0x5b, 0xd5, 0xda, 0x82, 0xcd, 0x3d, 0xf4, 0x19, 0x2c, 0x4f, 0x13, 0xe8, 0xc5, 0x2f,
  2925. 0x59, 0x6b, 0xe7, 0x68, 0xf7, 0xa1, 0x21, 0xa0, 0x19, 0xc4, 0xfb, 0x1c, 0x77, 0xae, 0xb5, 0xf3,
  2926. 0x74, 0xff, 0xea, 0xcd, 0xaf, 0x9e, 0xaf, 0x4a, 0x5f, 0x3f, 0x5f, 0x95, 0xfe, 0xfe, 0x7c, 0x55,
  2927. 0x7a, 0xf6, 0x62, 0x35, 0xf1, 0xf5, 0x8b, 0xd5, 0xc4, 0x5f, 0x5f, 0xac, 0x26, 0x7e, 0xfa, 0x66,
  2928. 0xcf, 0x24, 0xfd, 0x71, 0x67, 0xbd, 0x6b, 0x0f, 0x37, 0xc2, 0x7f, 0xe6, 0x98, 0xf5, 0x07, 0x93,
  2929. 0x4e, 0x96, 0x15, 0x95, 0x9b, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1b, 0xc1, 0x1e, 0x80,
  2930. 0x22, 0x00, 0x00,
  2931. }
  2932. // Reference imports to suppress errors if they are not otherwise used.
  2933. var _ context.Context
  2934. var _ grpc.ClientConn
  2935. // This is a compile-time assertion to ensure that this generated file
  2936. // is compatible with the grpc package it is being compiled against.
  2937. const _ = grpc.SupportPackageIsVersion4
  2938. // ABCIApplicationClient is the client API for ABCIApplication service.
  2939. //
  2940. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2941. type ABCIApplicationClient interface {
  2942. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2943. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2944. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2945. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2946. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2947. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2948. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2949. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2950. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2951. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2952. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2953. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2954. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2955. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2956. }
  2957. type aBCIApplicationClient struct {
  2958. cc *grpc.ClientConn
  2959. }
  2960. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2961. return &aBCIApplicationClient{cc}
  2962. }
  2963. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2964. out := new(ResponseEcho)
  2965. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2966. if err != nil {
  2967. return nil, err
  2968. }
  2969. return out, nil
  2970. }
  2971. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2972. out := new(ResponseFlush)
  2973. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2974. if err != nil {
  2975. return nil, err
  2976. }
  2977. return out, nil
  2978. }
  2979. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2980. out := new(ResponseInfo)
  2981. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2982. if err != nil {
  2983. return nil, err
  2984. }
  2985. return out, nil
  2986. }
  2987. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2988. out := new(ResponseDeliverTx)
  2989. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2990. if err != nil {
  2991. return nil, err
  2992. }
  2993. return out, nil
  2994. }
  2995. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2996. out := new(ResponseCheckTx)
  2997. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2998. if err != nil {
  2999. return nil, err
  3000. }
  3001. return out, nil
  3002. }
  3003. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  3004. out := new(ResponseQuery)
  3005. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  3006. if err != nil {
  3007. return nil, err
  3008. }
  3009. return out, nil
  3010. }
  3011. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  3012. out := new(ResponseCommit)
  3013. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  3014. if err != nil {
  3015. return nil, err
  3016. }
  3017. return out, nil
  3018. }
  3019. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  3020. out := new(ResponseInitChain)
  3021. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  3022. if err != nil {
  3023. return nil, err
  3024. }
  3025. return out, nil
  3026. }
  3027. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  3028. out := new(ResponseBeginBlock)
  3029. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  3030. if err != nil {
  3031. return nil, err
  3032. }
  3033. return out, nil
  3034. }
  3035. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  3036. out := new(ResponseEndBlock)
  3037. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  3038. if err != nil {
  3039. return nil, err
  3040. }
  3041. return out, nil
  3042. }
  3043. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  3044. out := new(ResponseListSnapshots)
  3045. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  3046. if err != nil {
  3047. return nil, err
  3048. }
  3049. return out, nil
  3050. }
  3051. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  3052. out := new(ResponseOfferSnapshot)
  3053. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  3054. if err != nil {
  3055. return nil, err
  3056. }
  3057. return out, nil
  3058. }
  3059. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  3060. out := new(ResponseLoadSnapshotChunk)
  3061. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  3062. if err != nil {
  3063. return nil, err
  3064. }
  3065. return out, nil
  3066. }
  3067. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  3068. out := new(ResponseApplySnapshotChunk)
  3069. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  3070. if err != nil {
  3071. return nil, err
  3072. }
  3073. return out, nil
  3074. }
  3075. // ABCIApplicationServer is the server API for ABCIApplication service.
  3076. type ABCIApplicationServer interface {
  3077. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  3078. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  3079. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  3080. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  3081. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  3082. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  3083. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  3084. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  3085. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  3086. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  3087. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  3088. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  3089. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  3090. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  3091. }
  3092. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  3093. type UnimplementedABCIApplicationServer struct {
  3094. }
  3095. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3096. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3097. }
  3098. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3099. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3100. }
  3101. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3102. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3103. }
  3104. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3105. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3106. }
  3107. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3108. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3109. }
  3110. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3111. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3112. }
  3113. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3114. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3115. }
  3116. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3117. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3118. }
  3119. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3120. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3121. }
  3122. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3123. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3124. }
  3125. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3126. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3127. }
  3128. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3129. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3130. }
  3131. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3132. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3133. }
  3134. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3135. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3136. }
  3137. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3138. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3139. }
  3140. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3141. in := new(RequestEcho)
  3142. if err := dec(in); err != nil {
  3143. return nil, err
  3144. }
  3145. if interceptor == nil {
  3146. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3147. }
  3148. info := &grpc.UnaryServerInfo{
  3149. Server: srv,
  3150. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3151. }
  3152. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3153. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3154. }
  3155. return interceptor(ctx, in, info, handler)
  3156. }
  3157. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3158. in := new(RequestFlush)
  3159. if err := dec(in); err != nil {
  3160. return nil, err
  3161. }
  3162. if interceptor == nil {
  3163. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3164. }
  3165. info := &grpc.UnaryServerInfo{
  3166. Server: srv,
  3167. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3168. }
  3169. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3170. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3171. }
  3172. return interceptor(ctx, in, info, handler)
  3173. }
  3174. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3175. in := new(RequestInfo)
  3176. if err := dec(in); err != nil {
  3177. return nil, err
  3178. }
  3179. if interceptor == nil {
  3180. return srv.(ABCIApplicationServer).Info(ctx, in)
  3181. }
  3182. info := &grpc.UnaryServerInfo{
  3183. Server: srv,
  3184. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3185. }
  3186. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3187. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3188. }
  3189. return interceptor(ctx, in, info, handler)
  3190. }
  3191. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3192. in := new(RequestDeliverTx)
  3193. if err := dec(in); err != nil {
  3194. return nil, err
  3195. }
  3196. if interceptor == nil {
  3197. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3198. }
  3199. info := &grpc.UnaryServerInfo{
  3200. Server: srv,
  3201. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3202. }
  3203. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3204. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3205. }
  3206. return interceptor(ctx, in, info, handler)
  3207. }
  3208. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3209. in := new(RequestCheckTx)
  3210. if err := dec(in); err != nil {
  3211. return nil, err
  3212. }
  3213. if interceptor == nil {
  3214. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3215. }
  3216. info := &grpc.UnaryServerInfo{
  3217. Server: srv,
  3218. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3219. }
  3220. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3221. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3222. }
  3223. return interceptor(ctx, in, info, handler)
  3224. }
  3225. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3226. in := new(RequestQuery)
  3227. if err := dec(in); err != nil {
  3228. return nil, err
  3229. }
  3230. if interceptor == nil {
  3231. return srv.(ABCIApplicationServer).Query(ctx, in)
  3232. }
  3233. info := &grpc.UnaryServerInfo{
  3234. Server: srv,
  3235. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3236. }
  3237. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3238. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3239. }
  3240. return interceptor(ctx, in, info, handler)
  3241. }
  3242. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3243. in := new(RequestCommit)
  3244. if err := dec(in); err != nil {
  3245. return nil, err
  3246. }
  3247. if interceptor == nil {
  3248. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3249. }
  3250. info := &grpc.UnaryServerInfo{
  3251. Server: srv,
  3252. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3253. }
  3254. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3255. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3256. }
  3257. return interceptor(ctx, in, info, handler)
  3258. }
  3259. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3260. in := new(RequestInitChain)
  3261. if err := dec(in); err != nil {
  3262. return nil, err
  3263. }
  3264. if interceptor == nil {
  3265. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3266. }
  3267. info := &grpc.UnaryServerInfo{
  3268. Server: srv,
  3269. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3270. }
  3271. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3272. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3273. }
  3274. return interceptor(ctx, in, info, handler)
  3275. }
  3276. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3277. in := new(RequestBeginBlock)
  3278. if err := dec(in); err != nil {
  3279. return nil, err
  3280. }
  3281. if interceptor == nil {
  3282. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3283. }
  3284. info := &grpc.UnaryServerInfo{
  3285. Server: srv,
  3286. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3287. }
  3288. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3289. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3290. }
  3291. return interceptor(ctx, in, info, handler)
  3292. }
  3293. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3294. in := new(RequestEndBlock)
  3295. if err := dec(in); err != nil {
  3296. return nil, err
  3297. }
  3298. if interceptor == nil {
  3299. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3300. }
  3301. info := &grpc.UnaryServerInfo{
  3302. Server: srv,
  3303. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3304. }
  3305. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3306. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3307. }
  3308. return interceptor(ctx, in, info, handler)
  3309. }
  3310. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3311. in := new(RequestListSnapshots)
  3312. if err := dec(in); err != nil {
  3313. return nil, err
  3314. }
  3315. if interceptor == nil {
  3316. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3317. }
  3318. info := &grpc.UnaryServerInfo{
  3319. Server: srv,
  3320. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3321. }
  3322. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3323. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3324. }
  3325. return interceptor(ctx, in, info, handler)
  3326. }
  3327. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3328. in := new(RequestOfferSnapshot)
  3329. if err := dec(in); err != nil {
  3330. return nil, err
  3331. }
  3332. if interceptor == nil {
  3333. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3334. }
  3335. info := &grpc.UnaryServerInfo{
  3336. Server: srv,
  3337. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3338. }
  3339. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3340. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3341. }
  3342. return interceptor(ctx, in, info, handler)
  3343. }
  3344. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3345. in := new(RequestLoadSnapshotChunk)
  3346. if err := dec(in); err != nil {
  3347. return nil, err
  3348. }
  3349. if interceptor == nil {
  3350. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3351. }
  3352. info := &grpc.UnaryServerInfo{
  3353. Server: srv,
  3354. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3355. }
  3356. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3357. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3358. }
  3359. return interceptor(ctx, in, info, handler)
  3360. }
  3361. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3362. in := new(RequestApplySnapshotChunk)
  3363. if err := dec(in); err != nil {
  3364. return nil, err
  3365. }
  3366. if interceptor == nil {
  3367. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3368. }
  3369. info := &grpc.UnaryServerInfo{
  3370. Server: srv,
  3371. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3372. }
  3373. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3374. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3375. }
  3376. return interceptor(ctx, in, info, handler)
  3377. }
  3378. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3379. ServiceName: "tendermint.abci.ABCIApplication",
  3380. HandlerType: (*ABCIApplicationServer)(nil),
  3381. Methods: []grpc.MethodDesc{
  3382. {
  3383. MethodName: "Echo",
  3384. Handler: _ABCIApplication_Echo_Handler,
  3385. },
  3386. {
  3387. MethodName: "Flush",
  3388. Handler: _ABCIApplication_Flush_Handler,
  3389. },
  3390. {
  3391. MethodName: "Info",
  3392. Handler: _ABCIApplication_Info_Handler,
  3393. },
  3394. {
  3395. MethodName: "DeliverTx",
  3396. Handler: _ABCIApplication_DeliverTx_Handler,
  3397. },
  3398. {
  3399. MethodName: "CheckTx",
  3400. Handler: _ABCIApplication_CheckTx_Handler,
  3401. },
  3402. {
  3403. MethodName: "Query",
  3404. Handler: _ABCIApplication_Query_Handler,
  3405. },
  3406. {
  3407. MethodName: "Commit",
  3408. Handler: _ABCIApplication_Commit_Handler,
  3409. },
  3410. {
  3411. MethodName: "InitChain",
  3412. Handler: _ABCIApplication_InitChain_Handler,
  3413. },
  3414. {
  3415. MethodName: "BeginBlock",
  3416. Handler: _ABCIApplication_BeginBlock_Handler,
  3417. },
  3418. {
  3419. MethodName: "EndBlock",
  3420. Handler: _ABCIApplication_EndBlock_Handler,
  3421. },
  3422. {
  3423. MethodName: "ListSnapshots",
  3424. Handler: _ABCIApplication_ListSnapshots_Handler,
  3425. },
  3426. {
  3427. MethodName: "OfferSnapshot",
  3428. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3429. },
  3430. {
  3431. MethodName: "LoadSnapshotChunk",
  3432. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3433. },
  3434. {
  3435. MethodName: "ApplySnapshotChunk",
  3436. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3437. },
  3438. },
  3439. Streams: []grpc.StreamDesc{},
  3440. Metadata: "tendermint/abci/types.proto",
  3441. }
  3442. func (m *Request) Marshal() (dAtA []byte, err error) {
  3443. size := m.Size()
  3444. dAtA = make([]byte, size)
  3445. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3446. if err != nil {
  3447. return nil, err
  3448. }
  3449. return dAtA[:n], nil
  3450. }
  3451. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3452. size := m.Size()
  3453. return m.MarshalToSizedBuffer(dAtA[:size])
  3454. }
  3455. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3456. i := len(dAtA)
  3457. _ = i
  3458. var l int
  3459. _ = l
  3460. if m.Value != nil {
  3461. {
  3462. size := m.Value.Size()
  3463. i -= size
  3464. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3465. return 0, err
  3466. }
  3467. }
  3468. }
  3469. return len(dAtA) - i, nil
  3470. }
  3471. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3472. size := m.Size()
  3473. return m.MarshalToSizedBuffer(dAtA[:size])
  3474. }
  3475. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3476. i := len(dAtA)
  3477. if m.Echo != nil {
  3478. {
  3479. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3480. if err != nil {
  3481. return 0, err
  3482. }
  3483. i -= size
  3484. i = encodeVarintTypes(dAtA, i, uint64(size))
  3485. }
  3486. i--
  3487. dAtA[i] = 0xa
  3488. }
  3489. return len(dAtA) - i, nil
  3490. }
  3491. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3492. size := m.Size()
  3493. return m.MarshalToSizedBuffer(dAtA[:size])
  3494. }
  3495. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3496. i := len(dAtA)
  3497. if m.Flush != nil {
  3498. {
  3499. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3500. if err != nil {
  3501. return 0, err
  3502. }
  3503. i -= size
  3504. i = encodeVarintTypes(dAtA, i, uint64(size))
  3505. }
  3506. i--
  3507. dAtA[i] = 0x12
  3508. }
  3509. return len(dAtA) - i, nil
  3510. }
  3511. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3512. size := m.Size()
  3513. return m.MarshalToSizedBuffer(dAtA[:size])
  3514. }
  3515. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3516. i := len(dAtA)
  3517. if m.Info != nil {
  3518. {
  3519. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3520. if err != nil {
  3521. return 0, err
  3522. }
  3523. i -= size
  3524. i = encodeVarintTypes(dAtA, i, uint64(size))
  3525. }
  3526. i--
  3527. dAtA[i] = 0x1a
  3528. }
  3529. return len(dAtA) - i, nil
  3530. }
  3531. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3532. size := m.Size()
  3533. return m.MarshalToSizedBuffer(dAtA[:size])
  3534. }
  3535. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3536. i := len(dAtA)
  3537. if m.InitChain != nil {
  3538. {
  3539. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3540. if err != nil {
  3541. return 0, err
  3542. }
  3543. i -= size
  3544. i = encodeVarintTypes(dAtA, i, uint64(size))
  3545. }
  3546. i--
  3547. dAtA[i] = 0x22
  3548. }
  3549. return len(dAtA) - i, nil
  3550. }
  3551. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3552. size := m.Size()
  3553. return m.MarshalToSizedBuffer(dAtA[:size])
  3554. }
  3555. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3556. i := len(dAtA)
  3557. if m.Query != nil {
  3558. {
  3559. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3560. if err != nil {
  3561. return 0, err
  3562. }
  3563. i -= size
  3564. i = encodeVarintTypes(dAtA, i, uint64(size))
  3565. }
  3566. i--
  3567. dAtA[i] = 0x2a
  3568. }
  3569. return len(dAtA) - i, nil
  3570. }
  3571. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3572. size := m.Size()
  3573. return m.MarshalToSizedBuffer(dAtA[:size])
  3574. }
  3575. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3576. i := len(dAtA)
  3577. if m.BeginBlock != nil {
  3578. {
  3579. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3580. if err != nil {
  3581. return 0, err
  3582. }
  3583. i -= size
  3584. i = encodeVarintTypes(dAtA, i, uint64(size))
  3585. }
  3586. i--
  3587. dAtA[i] = 0x32
  3588. }
  3589. return len(dAtA) - i, nil
  3590. }
  3591. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3592. size := m.Size()
  3593. return m.MarshalToSizedBuffer(dAtA[:size])
  3594. }
  3595. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3596. i := len(dAtA)
  3597. if m.CheckTx != nil {
  3598. {
  3599. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3600. if err != nil {
  3601. return 0, err
  3602. }
  3603. i -= size
  3604. i = encodeVarintTypes(dAtA, i, uint64(size))
  3605. }
  3606. i--
  3607. dAtA[i] = 0x3a
  3608. }
  3609. return len(dAtA) - i, nil
  3610. }
  3611. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3612. size := m.Size()
  3613. return m.MarshalToSizedBuffer(dAtA[:size])
  3614. }
  3615. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3616. i := len(dAtA)
  3617. if m.DeliverTx != nil {
  3618. {
  3619. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3620. if err != nil {
  3621. return 0, err
  3622. }
  3623. i -= size
  3624. i = encodeVarintTypes(dAtA, i, uint64(size))
  3625. }
  3626. i--
  3627. dAtA[i] = 0x42
  3628. }
  3629. return len(dAtA) - i, nil
  3630. }
  3631. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3632. size := m.Size()
  3633. return m.MarshalToSizedBuffer(dAtA[:size])
  3634. }
  3635. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3636. i := len(dAtA)
  3637. if m.EndBlock != nil {
  3638. {
  3639. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3640. if err != nil {
  3641. return 0, err
  3642. }
  3643. i -= size
  3644. i = encodeVarintTypes(dAtA, i, uint64(size))
  3645. }
  3646. i--
  3647. dAtA[i] = 0x4a
  3648. }
  3649. return len(dAtA) - i, nil
  3650. }
  3651. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3652. size := m.Size()
  3653. return m.MarshalToSizedBuffer(dAtA[:size])
  3654. }
  3655. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3656. i := len(dAtA)
  3657. if m.Commit != nil {
  3658. {
  3659. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3660. if err != nil {
  3661. return 0, err
  3662. }
  3663. i -= size
  3664. i = encodeVarintTypes(dAtA, i, uint64(size))
  3665. }
  3666. i--
  3667. dAtA[i] = 0x52
  3668. }
  3669. return len(dAtA) - i, nil
  3670. }
  3671. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3672. size := m.Size()
  3673. return m.MarshalToSizedBuffer(dAtA[:size])
  3674. }
  3675. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3676. i := len(dAtA)
  3677. if m.ListSnapshots != nil {
  3678. {
  3679. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3680. if err != nil {
  3681. return 0, err
  3682. }
  3683. i -= size
  3684. i = encodeVarintTypes(dAtA, i, uint64(size))
  3685. }
  3686. i--
  3687. dAtA[i] = 0x5a
  3688. }
  3689. return len(dAtA) - i, nil
  3690. }
  3691. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3692. size := m.Size()
  3693. return m.MarshalToSizedBuffer(dAtA[:size])
  3694. }
  3695. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3696. i := len(dAtA)
  3697. if m.OfferSnapshot != nil {
  3698. {
  3699. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3700. if err != nil {
  3701. return 0, err
  3702. }
  3703. i -= size
  3704. i = encodeVarintTypes(dAtA, i, uint64(size))
  3705. }
  3706. i--
  3707. dAtA[i] = 0x62
  3708. }
  3709. return len(dAtA) - i, nil
  3710. }
  3711. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3712. size := m.Size()
  3713. return m.MarshalToSizedBuffer(dAtA[:size])
  3714. }
  3715. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3716. i := len(dAtA)
  3717. if m.LoadSnapshotChunk != nil {
  3718. {
  3719. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3720. if err != nil {
  3721. return 0, err
  3722. }
  3723. i -= size
  3724. i = encodeVarintTypes(dAtA, i, uint64(size))
  3725. }
  3726. i--
  3727. dAtA[i] = 0x6a
  3728. }
  3729. return len(dAtA) - i, nil
  3730. }
  3731. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3732. size := m.Size()
  3733. return m.MarshalToSizedBuffer(dAtA[:size])
  3734. }
  3735. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3736. i := len(dAtA)
  3737. if m.ApplySnapshotChunk != nil {
  3738. {
  3739. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3740. if err != nil {
  3741. return 0, err
  3742. }
  3743. i -= size
  3744. i = encodeVarintTypes(dAtA, i, uint64(size))
  3745. }
  3746. i--
  3747. dAtA[i] = 0x72
  3748. }
  3749. return len(dAtA) - i, nil
  3750. }
  3751. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3752. size := m.Size()
  3753. dAtA = make([]byte, size)
  3754. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3755. if err != nil {
  3756. return nil, err
  3757. }
  3758. return dAtA[:n], nil
  3759. }
  3760. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3761. size := m.Size()
  3762. return m.MarshalToSizedBuffer(dAtA[:size])
  3763. }
  3764. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3765. i := len(dAtA)
  3766. _ = i
  3767. var l int
  3768. _ = l
  3769. if len(m.Message) > 0 {
  3770. i -= len(m.Message)
  3771. copy(dAtA[i:], m.Message)
  3772. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3773. i--
  3774. dAtA[i] = 0xa
  3775. }
  3776. return len(dAtA) - i, nil
  3777. }
  3778. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3779. size := m.Size()
  3780. dAtA = make([]byte, size)
  3781. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3782. if err != nil {
  3783. return nil, err
  3784. }
  3785. return dAtA[:n], nil
  3786. }
  3787. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3788. size := m.Size()
  3789. return m.MarshalToSizedBuffer(dAtA[:size])
  3790. }
  3791. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3792. i := len(dAtA)
  3793. _ = i
  3794. var l int
  3795. _ = l
  3796. return len(dAtA) - i, nil
  3797. }
  3798. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3799. size := m.Size()
  3800. dAtA = make([]byte, size)
  3801. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3802. if err != nil {
  3803. return nil, err
  3804. }
  3805. return dAtA[:n], nil
  3806. }
  3807. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3808. size := m.Size()
  3809. return m.MarshalToSizedBuffer(dAtA[:size])
  3810. }
  3811. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3812. i := len(dAtA)
  3813. _ = i
  3814. var l int
  3815. _ = l
  3816. if len(m.AbciVersion) > 0 {
  3817. i -= len(m.AbciVersion)
  3818. copy(dAtA[i:], m.AbciVersion)
  3819. i = encodeVarintTypes(dAtA, i, uint64(len(m.AbciVersion)))
  3820. i--
  3821. dAtA[i] = 0x22
  3822. }
  3823. if m.P2PVersion != 0 {
  3824. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3825. i--
  3826. dAtA[i] = 0x18
  3827. }
  3828. if m.BlockVersion != 0 {
  3829. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3830. i--
  3831. dAtA[i] = 0x10
  3832. }
  3833. if len(m.Version) > 0 {
  3834. i -= len(m.Version)
  3835. copy(dAtA[i:], m.Version)
  3836. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3837. i--
  3838. dAtA[i] = 0xa
  3839. }
  3840. return len(dAtA) - i, nil
  3841. }
  3842. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3843. size := m.Size()
  3844. dAtA = make([]byte, size)
  3845. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3846. if err != nil {
  3847. return nil, err
  3848. }
  3849. return dAtA[:n], nil
  3850. }
  3851. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3852. size := m.Size()
  3853. return m.MarshalToSizedBuffer(dAtA[:size])
  3854. }
  3855. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3856. i := len(dAtA)
  3857. _ = i
  3858. var l int
  3859. _ = l
  3860. if m.InitialHeight != 0 {
  3861. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3862. i--
  3863. dAtA[i] = 0x30
  3864. }
  3865. if len(m.AppStateBytes) > 0 {
  3866. i -= len(m.AppStateBytes)
  3867. copy(dAtA[i:], m.AppStateBytes)
  3868. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3869. i--
  3870. dAtA[i] = 0x2a
  3871. }
  3872. if len(m.Validators) > 0 {
  3873. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3874. {
  3875. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3876. if err != nil {
  3877. return 0, err
  3878. }
  3879. i -= size
  3880. i = encodeVarintTypes(dAtA, i, uint64(size))
  3881. }
  3882. i--
  3883. dAtA[i] = 0x22
  3884. }
  3885. }
  3886. if m.ConsensusParams != nil {
  3887. {
  3888. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3889. if err != nil {
  3890. return 0, err
  3891. }
  3892. i -= size
  3893. i = encodeVarintTypes(dAtA, i, uint64(size))
  3894. }
  3895. i--
  3896. dAtA[i] = 0x1a
  3897. }
  3898. if len(m.ChainId) > 0 {
  3899. i -= len(m.ChainId)
  3900. copy(dAtA[i:], m.ChainId)
  3901. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3902. i--
  3903. dAtA[i] = 0x12
  3904. }
  3905. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3906. if err16 != nil {
  3907. return 0, err16
  3908. }
  3909. i -= n16
  3910. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3911. i--
  3912. dAtA[i] = 0xa
  3913. return len(dAtA) - i, nil
  3914. }
  3915. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3916. size := m.Size()
  3917. dAtA = make([]byte, size)
  3918. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3919. if err != nil {
  3920. return nil, err
  3921. }
  3922. return dAtA[:n], nil
  3923. }
  3924. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3925. size := m.Size()
  3926. return m.MarshalToSizedBuffer(dAtA[:size])
  3927. }
  3928. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3929. i := len(dAtA)
  3930. _ = i
  3931. var l int
  3932. _ = l
  3933. if m.Prove {
  3934. i--
  3935. if m.Prove {
  3936. dAtA[i] = 1
  3937. } else {
  3938. dAtA[i] = 0
  3939. }
  3940. i--
  3941. dAtA[i] = 0x20
  3942. }
  3943. if m.Height != 0 {
  3944. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3945. i--
  3946. dAtA[i] = 0x18
  3947. }
  3948. if len(m.Path) > 0 {
  3949. i -= len(m.Path)
  3950. copy(dAtA[i:], m.Path)
  3951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3952. i--
  3953. dAtA[i] = 0x12
  3954. }
  3955. if len(m.Data) > 0 {
  3956. i -= len(m.Data)
  3957. copy(dAtA[i:], m.Data)
  3958. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3959. i--
  3960. dAtA[i] = 0xa
  3961. }
  3962. return len(dAtA) - i, nil
  3963. }
  3964. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3965. size := m.Size()
  3966. dAtA = make([]byte, size)
  3967. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3968. if err != nil {
  3969. return nil, err
  3970. }
  3971. return dAtA[:n], nil
  3972. }
  3973. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3974. size := m.Size()
  3975. return m.MarshalToSizedBuffer(dAtA[:size])
  3976. }
  3977. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3978. i := len(dAtA)
  3979. _ = i
  3980. var l int
  3981. _ = l
  3982. if len(m.ByzantineValidators) > 0 {
  3983. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3984. {
  3985. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3986. if err != nil {
  3987. return 0, err
  3988. }
  3989. i -= size
  3990. i = encodeVarintTypes(dAtA, i, uint64(size))
  3991. }
  3992. i--
  3993. dAtA[i] = 0x22
  3994. }
  3995. }
  3996. {
  3997. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3998. if err != nil {
  3999. return 0, err
  4000. }
  4001. i -= size
  4002. i = encodeVarintTypes(dAtA, i, uint64(size))
  4003. }
  4004. i--
  4005. dAtA[i] = 0x1a
  4006. {
  4007. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  4008. if err != nil {
  4009. return 0, err
  4010. }
  4011. i -= size
  4012. i = encodeVarintTypes(dAtA, i, uint64(size))
  4013. }
  4014. i--
  4015. dAtA[i] = 0x12
  4016. if len(m.Hash) > 0 {
  4017. i -= len(m.Hash)
  4018. copy(dAtA[i:], m.Hash)
  4019. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  4020. i--
  4021. dAtA[i] = 0xa
  4022. }
  4023. return len(dAtA) - i, nil
  4024. }
  4025. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  4026. size := m.Size()
  4027. dAtA = make([]byte, size)
  4028. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4029. if err != nil {
  4030. return nil, err
  4031. }
  4032. return dAtA[:n], nil
  4033. }
  4034. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4035. size := m.Size()
  4036. return m.MarshalToSizedBuffer(dAtA[:size])
  4037. }
  4038. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4039. i := len(dAtA)
  4040. _ = i
  4041. var l int
  4042. _ = l
  4043. if m.Type != 0 {
  4044. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  4045. i--
  4046. dAtA[i] = 0x10
  4047. }
  4048. if len(m.Tx) > 0 {
  4049. i -= len(m.Tx)
  4050. copy(dAtA[i:], m.Tx)
  4051. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4052. i--
  4053. dAtA[i] = 0xa
  4054. }
  4055. return len(dAtA) - i, nil
  4056. }
  4057. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  4058. size := m.Size()
  4059. dAtA = make([]byte, size)
  4060. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4061. if err != nil {
  4062. return nil, err
  4063. }
  4064. return dAtA[:n], nil
  4065. }
  4066. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4067. size := m.Size()
  4068. return m.MarshalToSizedBuffer(dAtA[:size])
  4069. }
  4070. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4071. i := len(dAtA)
  4072. _ = i
  4073. var l int
  4074. _ = l
  4075. if len(m.Tx) > 0 {
  4076. i -= len(m.Tx)
  4077. copy(dAtA[i:], m.Tx)
  4078. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4079. i--
  4080. dAtA[i] = 0xa
  4081. }
  4082. return len(dAtA) - i, nil
  4083. }
  4084. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  4085. size := m.Size()
  4086. dAtA = make([]byte, size)
  4087. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4088. if err != nil {
  4089. return nil, err
  4090. }
  4091. return dAtA[:n], nil
  4092. }
  4093. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4094. size := m.Size()
  4095. return m.MarshalToSizedBuffer(dAtA[:size])
  4096. }
  4097. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4098. i := len(dAtA)
  4099. _ = i
  4100. var l int
  4101. _ = l
  4102. if m.Height != 0 {
  4103. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4104. i--
  4105. dAtA[i] = 0x8
  4106. }
  4107. return len(dAtA) - i, nil
  4108. }
  4109. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4110. size := m.Size()
  4111. dAtA = make([]byte, size)
  4112. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4113. if err != nil {
  4114. return nil, err
  4115. }
  4116. return dAtA[:n], nil
  4117. }
  4118. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4119. size := m.Size()
  4120. return m.MarshalToSizedBuffer(dAtA[:size])
  4121. }
  4122. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4123. i := len(dAtA)
  4124. _ = i
  4125. var l int
  4126. _ = l
  4127. return len(dAtA) - i, nil
  4128. }
  4129. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4130. size := m.Size()
  4131. dAtA = make([]byte, size)
  4132. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4133. if err != nil {
  4134. return nil, err
  4135. }
  4136. return dAtA[:n], nil
  4137. }
  4138. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4139. size := m.Size()
  4140. return m.MarshalToSizedBuffer(dAtA[:size])
  4141. }
  4142. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4143. i := len(dAtA)
  4144. _ = i
  4145. var l int
  4146. _ = l
  4147. return len(dAtA) - i, nil
  4148. }
  4149. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4150. size := m.Size()
  4151. dAtA = make([]byte, size)
  4152. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4153. if err != nil {
  4154. return nil, err
  4155. }
  4156. return dAtA[:n], nil
  4157. }
  4158. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4159. size := m.Size()
  4160. return m.MarshalToSizedBuffer(dAtA[:size])
  4161. }
  4162. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4163. i := len(dAtA)
  4164. _ = i
  4165. var l int
  4166. _ = l
  4167. if len(m.AppHash) > 0 {
  4168. i -= len(m.AppHash)
  4169. copy(dAtA[i:], m.AppHash)
  4170. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4171. i--
  4172. dAtA[i] = 0x12
  4173. }
  4174. if m.Snapshot != nil {
  4175. {
  4176. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4177. if err != nil {
  4178. return 0, err
  4179. }
  4180. i -= size
  4181. i = encodeVarintTypes(dAtA, i, uint64(size))
  4182. }
  4183. i--
  4184. dAtA[i] = 0xa
  4185. }
  4186. return len(dAtA) - i, nil
  4187. }
  4188. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4189. size := m.Size()
  4190. dAtA = make([]byte, size)
  4191. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4192. if err != nil {
  4193. return nil, err
  4194. }
  4195. return dAtA[:n], nil
  4196. }
  4197. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4198. size := m.Size()
  4199. return m.MarshalToSizedBuffer(dAtA[:size])
  4200. }
  4201. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4202. i := len(dAtA)
  4203. _ = i
  4204. var l int
  4205. _ = l
  4206. if m.Chunk != 0 {
  4207. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4208. i--
  4209. dAtA[i] = 0x18
  4210. }
  4211. if m.Format != 0 {
  4212. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4213. i--
  4214. dAtA[i] = 0x10
  4215. }
  4216. if m.Height != 0 {
  4217. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4218. i--
  4219. dAtA[i] = 0x8
  4220. }
  4221. return len(dAtA) - i, nil
  4222. }
  4223. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4224. size := m.Size()
  4225. dAtA = make([]byte, size)
  4226. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4227. if err != nil {
  4228. return nil, err
  4229. }
  4230. return dAtA[:n], nil
  4231. }
  4232. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4233. size := m.Size()
  4234. return m.MarshalToSizedBuffer(dAtA[:size])
  4235. }
  4236. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4237. i := len(dAtA)
  4238. _ = i
  4239. var l int
  4240. _ = l
  4241. if len(m.Sender) > 0 {
  4242. i -= len(m.Sender)
  4243. copy(dAtA[i:], m.Sender)
  4244. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4245. i--
  4246. dAtA[i] = 0x1a
  4247. }
  4248. if len(m.Chunk) > 0 {
  4249. i -= len(m.Chunk)
  4250. copy(dAtA[i:], m.Chunk)
  4251. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4252. i--
  4253. dAtA[i] = 0x12
  4254. }
  4255. if m.Index != 0 {
  4256. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4257. i--
  4258. dAtA[i] = 0x8
  4259. }
  4260. return len(dAtA) - i, nil
  4261. }
  4262. func (m *Response) Marshal() (dAtA []byte, err error) {
  4263. size := m.Size()
  4264. dAtA = make([]byte, size)
  4265. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4266. if err != nil {
  4267. return nil, err
  4268. }
  4269. return dAtA[:n], nil
  4270. }
  4271. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4272. size := m.Size()
  4273. return m.MarshalToSizedBuffer(dAtA[:size])
  4274. }
  4275. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4276. i := len(dAtA)
  4277. _ = i
  4278. var l int
  4279. _ = l
  4280. if m.Value != nil {
  4281. {
  4282. size := m.Value.Size()
  4283. i -= size
  4284. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4285. return 0, err
  4286. }
  4287. }
  4288. }
  4289. return len(dAtA) - i, nil
  4290. }
  4291. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4292. size := m.Size()
  4293. return m.MarshalToSizedBuffer(dAtA[:size])
  4294. }
  4295. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4296. i := len(dAtA)
  4297. if m.Exception != nil {
  4298. {
  4299. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4300. if err != nil {
  4301. return 0, err
  4302. }
  4303. i -= size
  4304. i = encodeVarintTypes(dAtA, i, uint64(size))
  4305. }
  4306. i--
  4307. dAtA[i] = 0xa
  4308. }
  4309. return len(dAtA) - i, nil
  4310. }
  4311. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4312. size := m.Size()
  4313. return m.MarshalToSizedBuffer(dAtA[:size])
  4314. }
  4315. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4316. i := len(dAtA)
  4317. if m.Echo != nil {
  4318. {
  4319. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4320. if err != nil {
  4321. return 0, err
  4322. }
  4323. i -= size
  4324. i = encodeVarintTypes(dAtA, i, uint64(size))
  4325. }
  4326. i--
  4327. dAtA[i] = 0x12
  4328. }
  4329. return len(dAtA) - i, nil
  4330. }
  4331. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4332. size := m.Size()
  4333. return m.MarshalToSizedBuffer(dAtA[:size])
  4334. }
  4335. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4336. i := len(dAtA)
  4337. if m.Flush != nil {
  4338. {
  4339. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4340. if err != nil {
  4341. return 0, err
  4342. }
  4343. i -= size
  4344. i = encodeVarintTypes(dAtA, i, uint64(size))
  4345. }
  4346. i--
  4347. dAtA[i] = 0x1a
  4348. }
  4349. return len(dAtA) - i, nil
  4350. }
  4351. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4352. size := m.Size()
  4353. return m.MarshalToSizedBuffer(dAtA[:size])
  4354. }
  4355. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4356. i := len(dAtA)
  4357. if m.Info != nil {
  4358. {
  4359. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4360. if err != nil {
  4361. return 0, err
  4362. }
  4363. i -= size
  4364. i = encodeVarintTypes(dAtA, i, uint64(size))
  4365. }
  4366. i--
  4367. dAtA[i] = 0x22
  4368. }
  4369. return len(dAtA) - i, nil
  4370. }
  4371. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4372. size := m.Size()
  4373. return m.MarshalToSizedBuffer(dAtA[:size])
  4374. }
  4375. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4376. i := len(dAtA)
  4377. if m.InitChain != nil {
  4378. {
  4379. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4380. if err != nil {
  4381. return 0, err
  4382. }
  4383. i -= size
  4384. i = encodeVarintTypes(dAtA, i, uint64(size))
  4385. }
  4386. i--
  4387. dAtA[i] = 0x2a
  4388. }
  4389. return len(dAtA) - i, nil
  4390. }
  4391. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4392. size := m.Size()
  4393. return m.MarshalToSizedBuffer(dAtA[:size])
  4394. }
  4395. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4396. i := len(dAtA)
  4397. if m.Query != nil {
  4398. {
  4399. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4400. if err != nil {
  4401. return 0, err
  4402. }
  4403. i -= size
  4404. i = encodeVarintTypes(dAtA, i, uint64(size))
  4405. }
  4406. i--
  4407. dAtA[i] = 0x32
  4408. }
  4409. return len(dAtA) - i, nil
  4410. }
  4411. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4412. size := m.Size()
  4413. return m.MarshalToSizedBuffer(dAtA[:size])
  4414. }
  4415. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4416. i := len(dAtA)
  4417. if m.BeginBlock != nil {
  4418. {
  4419. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4420. if err != nil {
  4421. return 0, err
  4422. }
  4423. i -= size
  4424. i = encodeVarintTypes(dAtA, i, uint64(size))
  4425. }
  4426. i--
  4427. dAtA[i] = 0x3a
  4428. }
  4429. return len(dAtA) - i, nil
  4430. }
  4431. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4432. size := m.Size()
  4433. return m.MarshalToSizedBuffer(dAtA[:size])
  4434. }
  4435. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4436. i := len(dAtA)
  4437. if m.CheckTx != nil {
  4438. {
  4439. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4440. if err != nil {
  4441. return 0, err
  4442. }
  4443. i -= size
  4444. i = encodeVarintTypes(dAtA, i, uint64(size))
  4445. }
  4446. i--
  4447. dAtA[i] = 0x42
  4448. }
  4449. return len(dAtA) - i, nil
  4450. }
  4451. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4452. size := m.Size()
  4453. return m.MarshalToSizedBuffer(dAtA[:size])
  4454. }
  4455. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4456. i := len(dAtA)
  4457. if m.DeliverTx != nil {
  4458. {
  4459. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4460. if err != nil {
  4461. return 0, err
  4462. }
  4463. i -= size
  4464. i = encodeVarintTypes(dAtA, i, uint64(size))
  4465. }
  4466. i--
  4467. dAtA[i] = 0x4a
  4468. }
  4469. return len(dAtA) - i, nil
  4470. }
  4471. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4472. size := m.Size()
  4473. return m.MarshalToSizedBuffer(dAtA[:size])
  4474. }
  4475. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4476. i := len(dAtA)
  4477. if m.EndBlock != nil {
  4478. {
  4479. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4480. if err != nil {
  4481. return 0, err
  4482. }
  4483. i -= size
  4484. i = encodeVarintTypes(dAtA, i, uint64(size))
  4485. }
  4486. i--
  4487. dAtA[i] = 0x52
  4488. }
  4489. return len(dAtA) - i, nil
  4490. }
  4491. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4492. size := m.Size()
  4493. return m.MarshalToSizedBuffer(dAtA[:size])
  4494. }
  4495. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4496. i := len(dAtA)
  4497. if m.Commit != nil {
  4498. {
  4499. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4500. if err != nil {
  4501. return 0, err
  4502. }
  4503. i -= size
  4504. i = encodeVarintTypes(dAtA, i, uint64(size))
  4505. }
  4506. i--
  4507. dAtA[i] = 0x5a
  4508. }
  4509. return len(dAtA) - i, nil
  4510. }
  4511. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4512. size := m.Size()
  4513. return m.MarshalToSizedBuffer(dAtA[:size])
  4514. }
  4515. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4516. i := len(dAtA)
  4517. if m.ListSnapshots != nil {
  4518. {
  4519. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4520. if err != nil {
  4521. return 0, err
  4522. }
  4523. i -= size
  4524. i = encodeVarintTypes(dAtA, i, uint64(size))
  4525. }
  4526. i--
  4527. dAtA[i] = 0x62
  4528. }
  4529. return len(dAtA) - i, nil
  4530. }
  4531. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4532. size := m.Size()
  4533. return m.MarshalToSizedBuffer(dAtA[:size])
  4534. }
  4535. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4536. i := len(dAtA)
  4537. if m.OfferSnapshot != nil {
  4538. {
  4539. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4540. if err != nil {
  4541. return 0, err
  4542. }
  4543. i -= size
  4544. i = encodeVarintTypes(dAtA, i, uint64(size))
  4545. }
  4546. i--
  4547. dAtA[i] = 0x6a
  4548. }
  4549. return len(dAtA) - i, nil
  4550. }
  4551. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4552. size := m.Size()
  4553. return m.MarshalToSizedBuffer(dAtA[:size])
  4554. }
  4555. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4556. i := len(dAtA)
  4557. if m.LoadSnapshotChunk != nil {
  4558. {
  4559. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4560. if err != nil {
  4561. return 0, err
  4562. }
  4563. i -= size
  4564. i = encodeVarintTypes(dAtA, i, uint64(size))
  4565. }
  4566. i--
  4567. dAtA[i] = 0x72
  4568. }
  4569. return len(dAtA) - i, nil
  4570. }
  4571. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4572. size := m.Size()
  4573. return m.MarshalToSizedBuffer(dAtA[:size])
  4574. }
  4575. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4576. i := len(dAtA)
  4577. if m.ApplySnapshotChunk != nil {
  4578. {
  4579. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4580. if err != nil {
  4581. return 0, err
  4582. }
  4583. i -= size
  4584. i = encodeVarintTypes(dAtA, i, uint64(size))
  4585. }
  4586. i--
  4587. dAtA[i] = 0x7a
  4588. }
  4589. return len(dAtA) - i, nil
  4590. }
  4591. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4592. size := m.Size()
  4593. dAtA = make([]byte, size)
  4594. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4595. if err != nil {
  4596. return nil, err
  4597. }
  4598. return dAtA[:n], nil
  4599. }
  4600. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4601. size := m.Size()
  4602. return m.MarshalToSizedBuffer(dAtA[:size])
  4603. }
  4604. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4605. i := len(dAtA)
  4606. _ = i
  4607. var l int
  4608. _ = l
  4609. if len(m.Error) > 0 {
  4610. i -= len(m.Error)
  4611. copy(dAtA[i:], m.Error)
  4612. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4613. i--
  4614. dAtA[i] = 0xa
  4615. }
  4616. return len(dAtA) - i, nil
  4617. }
  4618. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4619. size := m.Size()
  4620. dAtA = make([]byte, size)
  4621. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4622. if err != nil {
  4623. return nil, err
  4624. }
  4625. return dAtA[:n], nil
  4626. }
  4627. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4628. size := m.Size()
  4629. return m.MarshalToSizedBuffer(dAtA[:size])
  4630. }
  4631. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4632. i := len(dAtA)
  4633. _ = i
  4634. var l int
  4635. _ = l
  4636. if len(m.Message) > 0 {
  4637. i -= len(m.Message)
  4638. copy(dAtA[i:], m.Message)
  4639. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4640. i--
  4641. dAtA[i] = 0xa
  4642. }
  4643. return len(dAtA) - i, nil
  4644. }
  4645. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4646. size := m.Size()
  4647. dAtA = make([]byte, size)
  4648. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4649. if err != nil {
  4650. return nil, err
  4651. }
  4652. return dAtA[:n], nil
  4653. }
  4654. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4655. size := m.Size()
  4656. return m.MarshalToSizedBuffer(dAtA[:size])
  4657. }
  4658. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4659. i := len(dAtA)
  4660. _ = i
  4661. var l int
  4662. _ = l
  4663. return len(dAtA) - i, nil
  4664. }
  4665. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4666. size := m.Size()
  4667. dAtA = make([]byte, size)
  4668. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4669. if err != nil {
  4670. return nil, err
  4671. }
  4672. return dAtA[:n], nil
  4673. }
  4674. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4675. size := m.Size()
  4676. return m.MarshalToSizedBuffer(dAtA[:size])
  4677. }
  4678. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4679. i := len(dAtA)
  4680. _ = i
  4681. var l int
  4682. _ = l
  4683. if len(m.LastBlockAppHash) > 0 {
  4684. i -= len(m.LastBlockAppHash)
  4685. copy(dAtA[i:], m.LastBlockAppHash)
  4686. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4687. i--
  4688. dAtA[i] = 0x2a
  4689. }
  4690. if m.LastBlockHeight != 0 {
  4691. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4692. i--
  4693. dAtA[i] = 0x20
  4694. }
  4695. if m.AppVersion != 0 {
  4696. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4697. i--
  4698. dAtA[i] = 0x18
  4699. }
  4700. if len(m.Version) > 0 {
  4701. i -= len(m.Version)
  4702. copy(dAtA[i:], m.Version)
  4703. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4704. i--
  4705. dAtA[i] = 0x12
  4706. }
  4707. if len(m.Data) > 0 {
  4708. i -= len(m.Data)
  4709. copy(dAtA[i:], m.Data)
  4710. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4711. i--
  4712. dAtA[i] = 0xa
  4713. }
  4714. return len(dAtA) - i, nil
  4715. }
  4716. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4717. size := m.Size()
  4718. dAtA = make([]byte, size)
  4719. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4720. if err != nil {
  4721. return nil, err
  4722. }
  4723. return dAtA[:n], nil
  4724. }
  4725. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4726. size := m.Size()
  4727. return m.MarshalToSizedBuffer(dAtA[:size])
  4728. }
  4729. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4730. i := len(dAtA)
  4731. _ = i
  4732. var l int
  4733. _ = l
  4734. if len(m.AppHash) > 0 {
  4735. i -= len(m.AppHash)
  4736. copy(dAtA[i:], m.AppHash)
  4737. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4738. i--
  4739. dAtA[i] = 0x1a
  4740. }
  4741. if len(m.Validators) > 0 {
  4742. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4743. {
  4744. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4745. if err != nil {
  4746. return 0, err
  4747. }
  4748. i -= size
  4749. i = encodeVarintTypes(dAtA, i, uint64(size))
  4750. }
  4751. i--
  4752. dAtA[i] = 0x12
  4753. }
  4754. }
  4755. if m.ConsensusParams != nil {
  4756. {
  4757. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4758. if err != nil {
  4759. return 0, err
  4760. }
  4761. i -= size
  4762. i = encodeVarintTypes(dAtA, i, uint64(size))
  4763. }
  4764. i--
  4765. dAtA[i] = 0xa
  4766. }
  4767. return len(dAtA) - i, nil
  4768. }
  4769. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4770. size := m.Size()
  4771. dAtA = make([]byte, size)
  4772. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4773. if err != nil {
  4774. return nil, err
  4775. }
  4776. return dAtA[:n], nil
  4777. }
  4778. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4779. size := m.Size()
  4780. return m.MarshalToSizedBuffer(dAtA[:size])
  4781. }
  4782. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4783. i := len(dAtA)
  4784. _ = i
  4785. var l int
  4786. _ = l
  4787. if len(m.Codespace) > 0 {
  4788. i -= len(m.Codespace)
  4789. copy(dAtA[i:], m.Codespace)
  4790. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4791. i--
  4792. dAtA[i] = 0x52
  4793. }
  4794. if m.Height != 0 {
  4795. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4796. i--
  4797. dAtA[i] = 0x48
  4798. }
  4799. if m.ProofOps != nil {
  4800. {
  4801. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4802. if err != nil {
  4803. return 0, err
  4804. }
  4805. i -= size
  4806. i = encodeVarintTypes(dAtA, i, uint64(size))
  4807. }
  4808. i--
  4809. dAtA[i] = 0x42
  4810. }
  4811. if len(m.Value) > 0 {
  4812. i -= len(m.Value)
  4813. copy(dAtA[i:], m.Value)
  4814. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4815. i--
  4816. dAtA[i] = 0x3a
  4817. }
  4818. if len(m.Key) > 0 {
  4819. i -= len(m.Key)
  4820. copy(dAtA[i:], m.Key)
  4821. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4822. i--
  4823. dAtA[i] = 0x32
  4824. }
  4825. if m.Index != 0 {
  4826. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4827. i--
  4828. dAtA[i] = 0x28
  4829. }
  4830. if len(m.Info) > 0 {
  4831. i -= len(m.Info)
  4832. copy(dAtA[i:], m.Info)
  4833. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4834. i--
  4835. dAtA[i] = 0x22
  4836. }
  4837. if len(m.Log) > 0 {
  4838. i -= len(m.Log)
  4839. copy(dAtA[i:], m.Log)
  4840. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4841. i--
  4842. dAtA[i] = 0x1a
  4843. }
  4844. if m.Code != 0 {
  4845. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4846. i--
  4847. dAtA[i] = 0x8
  4848. }
  4849. return len(dAtA) - i, nil
  4850. }
  4851. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4852. size := m.Size()
  4853. dAtA = make([]byte, size)
  4854. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4855. if err != nil {
  4856. return nil, err
  4857. }
  4858. return dAtA[:n], nil
  4859. }
  4860. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4861. size := m.Size()
  4862. return m.MarshalToSizedBuffer(dAtA[:size])
  4863. }
  4864. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4865. i := len(dAtA)
  4866. _ = i
  4867. var l int
  4868. _ = l
  4869. if len(m.Events) > 0 {
  4870. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4871. {
  4872. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4873. if err != nil {
  4874. return 0, err
  4875. }
  4876. i -= size
  4877. i = encodeVarintTypes(dAtA, i, uint64(size))
  4878. }
  4879. i--
  4880. dAtA[i] = 0xa
  4881. }
  4882. }
  4883. return len(dAtA) - i, nil
  4884. }
  4885. func (m *ResponseCheckTx) 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 *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4895. size := m.Size()
  4896. return m.MarshalToSizedBuffer(dAtA[:size])
  4897. }
  4898. func (m *ResponseCheckTx) 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 *ResponseDeliverTx) 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 *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4972. size := m.Size()
  4973. return m.MarshalToSizedBuffer(dAtA[:size])
  4974. }
  4975. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4976. i := len(dAtA)
  4977. _ = i
  4978. var l int
  4979. _ = l
  4980. if len(m.Codespace) > 0 {
  4981. i -= len(m.Codespace)
  4982. copy(dAtA[i:], m.Codespace)
  4983. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4984. i--
  4985. dAtA[i] = 0x42
  4986. }
  4987. if len(m.Events) > 0 {
  4988. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4989. {
  4990. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4991. if err != nil {
  4992. return 0, err
  4993. }
  4994. i -= size
  4995. i = encodeVarintTypes(dAtA, i, uint64(size))
  4996. }
  4997. i--
  4998. dAtA[i] = 0x3a
  4999. }
  5000. }
  5001. if m.GasUsed != 0 {
  5002. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  5003. i--
  5004. dAtA[i] = 0x30
  5005. }
  5006. if m.GasWanted != 0 {
  5007. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  5008. i--
  5009. dAtA[i] = 0x28
  5010. }
  5011. if len(m.Info) > 0 {
  5012. i -= len(m.Info)
  5013. copy(dAtA[i:], m.Info)
  5014. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  5015. i--
  5016. dAtA[i] = 0x22
  5017. }
  5018. if len(m.Log) > 0 {
  5019. i -= len(m.Log)
  5020. copy(dAtA[i:], m.Log)
  5021. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5022. i--
  5023. dAtA[i] = 0x1a
  5024. }
  5025. if len(m.Data) > 0 {
  5026. i -= len(m.Data)
  5027. copy(dAtA[i:], m.Data)
  5028. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5029. i--
  5030. dAtA[i] = 0x12
  5031. }
  5032. if m.Code != 0 {
  5033. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5034. i--
  5035. dAtA[i] = 0x8
  5036. }
  5037. return len(dAtA) - i, nil
  5038. }
  5039. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  5040. size := m.Size()
  5041. dAtA = make([]byte, size)
  5042. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5043. if err != nil {
  5044. return nil, err
  5045. }
  5046. return dAtA[:n], nil
  5047. }
  5048. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  5049. size := m.Size()
  5050. return m.MarshalToSizedBuffer(dAtA[:size])
  5051. }
  5052. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5053. i := len(dAtA)
  5054. _ = i
  5055. var l int
  5056. _ = l
  5057. if len(m.Events) > 0 {
  5058. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5059. {
  5060. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5061. if err != nil {
  5062. return 0, err
  5063. }
  5064. i -= size
  5065. i = encodeVarintTypes(dAtA, i, uint64(size))
  5066. }
  5067. i--
  5068. dAtA[i] = 0x1a
  5069. }
  5070. }
  5071. if m.ConsensusParamUpdates != nil {
  5072. {
  5073. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  5074. if err != nil {
  5075. return 0, err
  5076. }
  5077. i -= size
  5078. i = encodeVarintTypes(dAtA, i, uint64(size))
  5079. }
  5080. i--
  5081. dAtA[i] = 0x12
  5082. }
  5083. if len(m.ValidatorUpdates) > 0 {
  5084. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5085. {
  5086. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5087. if err != nil {
  5088. return 0, err
  5089. }
  5090. i -= size
  5091. i = encodeVarintTypes(dAtA, i, uint64(size))
  5092. }
  5093. i--
  5094. dAtA[i] = 0xa
  5095. }
  5096. }
  5097. return len(dAtA) - i, nil
  5098. }
  5099. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5100. size := m.Size()
  5101. dAtA = make([]byte, size)
  5102. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5103. if err != nil {
  5104. return nil, err
  5105. }
  5106. return dAtA[:n], nil
  5107. }
  5108. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5109. size := m.Size()
  5110. return m.MarshalToSizedBuffer(dAtA[:size])
  5111. }
  5112. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5113. i := len(dAtA)
  5114. _ = i
  5115. var l int
  5116. _ = l
  5117. if m.RetainHeight != 0 {
  5118. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5119. i--
  5120. dAtA[i] = 0x18
  5121. }
  5122. if len(m.Data) > 0 {
  5123. i -= len(m.Data)
  5124. copy(dAtA[i:], m.Data)
  5125. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5126. i--
  5127. dAtA[i] = 0x12
  5128. }
  5129. return len(dAtA) - i, nil
  5130. }
  5131. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5132. size := m.Size()
  5133. dAtA = make([]byte, size)
  5134. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5135. if err != nil {
  5136. return nil, err
  5137. }
  5138. return dAtA[:n], nil
  5139. }
  5140. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5141. size := m.Size()
  5142. return m.MarshalToSizedBuffer(dAtA[:size])
  5143. }
  5144. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5145. i := len(dAtA)
  5146. _ = i
  5147. var l int
  5148. _ = l
  5149. if len(m.Snapshots) > 0 {
  5150. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5151. {
  5152. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5153. if err != nil {
  5154. return 0, err
  5155. }
  5156. i -= size
  5157. i = encodeVarintTypes(dAtA, i, uint64(size))
  5158. }
  5159. i--
  5160. dAtA[i] = 0xa
  5161. }
  5162. }
  5163. return len(dAtA) - i, nil
  5164. }
  5165. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5166. size := m.Size()
  5167. dAtA = make([]byte, size)
  5168. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5169. if err != nil {
  5170. return nil, err
  5171. }
  5172. return dAtA[:n], nil
  5173. }
  5174. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5175. size := m.Size()
  5176. return m.MarshalToSizedBuffer(dAtA[:size])
  5177. }
  5178. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5179. i := len(dAtA)
  5180. _ = i
  5181. var l int
  5182. _ = l
  5183. if m.Result != 0 {
  5184. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5185. i--
  5186. dAtA[i] = 0x8
  5187. }
  5188. return len(dAtA) - i, nil
  5189. }
  5190. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5191. size := m.Size()
  5192. dAtA = make([]byte, size)
  5193. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5194. if err != nil {
  5195. return nil, err
  5196. }
  5197. return dAtA[:n], nil
  5198. }
  5199. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5200. size := m.Size()
  5201. return m.MarshalToSizedBuffer(dAtA[:size])
  5202. }
  5203. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5204. i := len(dAtA)
  5205. _ = i
  5206. var l int
  5207. _ = l
  5208. if len(m.Chunk) > 0 {
  5209. i -= len(m.Chunk)
  5210. copy(dAtA[i:], m.Chunk)
  5211. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5212. i--
  5213. dAtA[i] = 0xa
  5214. }
  5215. return len(dAtA) - i, nil
  5216. }
  5217. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5218. size := m.Size()
  5219. dAtA = make([]byte, size)
  5220. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5221. if err != nil {
  5222. return nil, err
  5223. }
  5224. return dAtA[:n], nil
  5225. }
  5226. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5227. size := m.Size()
  5228. return m.MarshalToSizedBuffer(dAtA[:size])
  5229. }
  5230. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5231. i := len(dAtA)
  5232. _ = i
  5233. var l int
  5234. _ = l
  5235. if len(m.RejectSenders) > 0 {
  5236. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5237. i -= len(m.RejectSenders[iNdEx])
  5238. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5239. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5240. i--
  5241. dAtA[i] = 0x1a
  5242. }
  5243. }
  5244. if len(m.RefetchChunks) > 0 {
  5245. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5246. var j38 int
  5247. for _, num := range m.RefetchChunks {
  5248. for num >= 1<<7 {
  5249. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5250. num >>= 7
  5251. j38++
  5252. }
  5253. dAtA39[j38] = uint8(num)
  5254. j38++
  5255. }
  5256. i -= j38
  5257. copy(dAtA[i:], dAtA39[:j38])
  5258. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5259. i--
  5260. dAtA[i] = 0x12
  5261. }
  5262. if m.Result != 0 {
  5263. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5264. i--
  5265. dAtA[i] = 0x8
  5266. }
  5267. return len(dAtA) - i, nil
  5268. }
  5269. func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
  5270. size := m.Size()
  5271. dAtA = make([]byte, size)
  5272. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5273. if err != nil {
  5274. return nil, err
  5275. }
  5276. return dAtA[:n], nil
  5277. }
  5278. func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
  5279. size := m.Size()
  5280. return m.MarshalToSizedBuffer(dAtA[:size])
  5281. }
  5282. func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5283. i := len(dAtA)
  5284. _ = i
  5285. var l int
  5286. _ = l
  5287. if m.Version != nil {
  5288. {
  5289. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  5290. if err != nil {
  5291. return 0, err
  5292. }
  5293. i -= size
  5294. i = encodeVarintTypes(dAtA, i, uint64(size))
  5295. }
  5296. i--
  5297. dAtA[i] = 0x22
  5298. }
  5299. if m.Validator != nil {
  5300. {
  5301. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5302. if err != nil {
  5303. return 0, err
  5304. }
  5305. i -= size
  5306. i = encodeVarintTypes(dAtA, i, uint64(size))
  5307. }
  5308. i--
  5309. dAtA[i] = 0x1a
  5310. }
  5311. if m.Evidence != nil {
  5312. {
  5313. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  5314. if err != nil {
  5315. return 0, err
  5316. }
  5317. i -= size
  5318. i = encodeVarintTypes(dAtA, i, uint64(size))
  5319. }
  5320. i--
  5321. dAtA[i] = 0x12
  5322. }
  5323. if m.Block != nil {
  5324. {
  5325. size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
  5326. if err != nil {
  5327. return 0, err
  5328. }
  5329. i -= size
  5330. i = encodeVarintTypes(dAtA, i, uint64(size))
  5331. }
  5332. i--
  5333. dAtA[i] = 0xa
  5334. }
  5335. return len(dAtA) - i, nil
  5336. }
  5337. func (m *BlockParams) Marshal() (dAtA []byte, err error) {
  5338. size := m.Size()
  5339. dAtA = make([]byte, size)
  5340. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5341. if err != nil {
  5342. return nil, err
  5343. }
  5344. return dAtA[:n], nil
  5345. }
  5346. func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) {
  5347. size := m.Size()
  5348. return m.MarshalToSizedBuffer(dAtA[:size])
  5349. }
  5350. func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5351. i := len(dAtA)
  5352. _ = i
  5353. var l int
  5354. _ = l
  5355. if m.MaxGas != 0 {
  5356. i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas))
  5357. i--
  5358. dAtA[i] = 0x10
  5359. }
  5360. if m.MaxBytes != 0 {
  5361. i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes))
  5362. i--
  5363. dAtA[i] = 0x8
  5364. }
  5365. return len(dAtA) - i, nil
  5366. }
  5367. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5368. size := m.Size()
  5369. dAtA = make([]byte, size)
  5370. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5371. if err != nil {
  5372. return nil, err
  5373. }
  5374. return dAtA[:n], nil
  5375. }
  5376. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5377. size := m.Size()
  5378. return m.MarshalToSizedBuffer(dAtA[:size])
  5379. }
  5380. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5381. i := len(dAtA)
  5382. _ = i
  5383. var l int
  5384. _ = l
  5385. if len(m.Votes) > 0 {
  5386. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5387. {
  5388. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5389. if err != nil {
  5390. return 0, err
  5391. }
  5392. i -= size
  5393. i = encodeVarintTypes(dAtA, i, uint64(size))
  5394. }
  5395. i--
  5396. dAtA[i] = 0x12
  5397. }
  5398. }
  5399. if m.Round != 0 {
  5400. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5401. i--
  5402. dAtA[i] = 0x8
  5403. }
  5404. return len(dAtA) - i, nil
  5405. }
  5406. func (m *Event) Marshal() (dAtA []byte, err error) {
  5407. size := m.Size()
  5408. dAtA = make([]byte, size)
  5409. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5410. if err != nil {
  5411. return nil, err
  5412. }
  5413. return dAtA[:n], nil
  5414. }
  5415. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5416. size := m.Size()
  5417. return m.MarshalToSizedBuffer(dAtA[:size])
  5418. }
  5419. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5420. i := len(dAtA)
  5421. _ = i
  5422. var l int
  5423. _ = l
  5424. if len(m.Attributes) > 0 {
  5425. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5426. {
  5427. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5428. if err != nil {
  5429. return 0, err
  5430. }
  5431. i -= size
  5432. i = encodeVarintTypes(dAtA, i, uint64(size))
  5433. }
  5434. i--
  5435. dAtA[i] = 0x12
  5436. }
  5437. }
  5438. if len(m.Type) > 0 {
  5439. i -= len(m.Type)
  5440. copy(dAtA[i:], m.Type)
  5441. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5442. i--
  5443. dAtA[i] = 0xa
  5444. }
  5445. return len(dAtA) - i, nil
  5446. }
  5447. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5448. size := m.Size()
  5449. dAtA = make([]byte, size)
  5450. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5451. if err != nil {
  5452. return nil, err
  5453. }
  5454. return dAtA[:n], nil
  5455. }
  5456. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5457. size := m.Size()
  5458. return m.MarshalToSizedBuffer(dAtA[:size])
  5459. }
  5460. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5461. i := len(dAtA)
  5462. _ = i
  5463. var l int
  5464. _ = l
  5465. if m.Index {
  5466. i--
  5467. if m.Index {
  5468. dAtA[i] = 1
  5469. } else {
  5470. dAtA[i] = 0
  5471. }
  5472. i--
  5473. dAtA[i] = 0x18
  5474. }
  5475. if len(m.Value) > 0 {
  5476. i -= len(m.Value)
  5477. copy(dAtA[i:], m.Value)
  5478. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5479. i--
  5480. dAtA[i] = 0x12
  5481. }
  5482. if len(m.Key) > 0 {
  5483. i -= len(m.Key)
  5484. copy(dAtA[i:], m.Key)
  5485. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5486. i--
  5487. dAtA[i] = 0xa
  5488. }
  5489. return len(dAtA) - i, nil
  5490. }
  5491. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5492. size := m.Size()
  5493. dAtA = make([]byte, size)
  5494. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5495. if err != nil {
  5496. return nil, err
  5497. }
  5498. return dAtA[:n], nil
  5499. }
  5500. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5501. size := m.Size()
  5502. return m.MarshalToSizedBuffer(dAtA[:size])
  5503. }
  5504. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5505. i := len(dAtA)
  5506. _ = i
  5507. var l int
  5508. _ = l
  5509. {
  5510. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5511. if err != nil {
  5512. return 0, err
  5513. }
  5514. i -= size
  5515. i = encodeVarintTypes(dAtA, i, uint64(size))
  5516. }
  5517. i--
  5518. dAtA[i] = 0x22
  5519. if len(m.Tx) > 0 {
  5520. i -= len(m.Tx)
  5521. copy(dAtA[i:], m.Tx)
  5522. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5523. i--
  5524. dAtA[i] = 0x1a
  5525. }
  5526. if m.Index != 0 {
  5527. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5528. i--
  5529. dAtA[i] = 0x10
  5530. }
  5531. if m.Height != 0 {
  5532. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5533. i--
  5534. dAtA[i] = 0x8
  5535. }
  5536. return len(dAtA) - i, nil
  5537. }
  5538. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5539. size := m.Size()
  5540. dAtA = make([]byte, size)
  5541. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5542. if err != nil {
  5543. return nil, err
  5544. }
  5545. return dAtA[:n], nil
  5546. }
  5547. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5548. size := m.Size()
  5549. return m.MarshalToSizedBuffer(dAtA[:size])
  5550. }
  5551. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5552. i := len(dAtA)
  5553. _ = i
  5554. var l int
  5555. _ = l
  5556. if m.Power != 0 {
  5557. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5558. i--
  5559. dAtA[i] = 0x18
  5560. }
  5561. if len(m.Address) > 0 {
  5562. i -= len(m.Address)
  5563. copy(dAtA[i:], m.Address)
  5564. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5565. i--
  5566. dAtA[i] = 0xa
  5567. }
  5568. return len(dAtA) - i, nil
  5569. }
  5570. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5571. size := m.Size()
  5572. dAtA = make([]byte, size)
  5573. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5574. if err != nil {
  5575. return nil, err
  5576. }
  5577. return dAtA[:n], nil
  5578. }
  5579. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5580. size := m.Size()
  5581. return m.MarshalToSizedBuffer(dAtA[:size])
  5582. }
  5583. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5584. i := len(dAtA)
  5585. _ = i
  5586. var l int
  5587. _ = l
  5588. if m.Power != 0 {
  5589. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5590. i--
  5591. dAtA[i] = 0x10
  5592. }
  5593. {
  5594. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5595. if err != nil {
  5596. return 0, err
  5597. }
  5598. i -= size
  5599. i = encodeVarintTypes(dAtA, i, uint64(size))
  5600. }
  5601. i--
  5602. dAtA[i] = 0xa
  5603. return len(dAtA) - i, nil
  5604. }
  5605. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5606. size := m.Size()
  5607. dAtA = make([]byte, size)
  5608. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5609. if err != nil {
  5610. return nil, err
  5611. }
  5612. return dAtA[:n], nil
  5613. }
  5614. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5615. size := m.Size()
  5616. return m.MarshalToSizedBuffer(dAtA[:size])
  5617. }
  5618. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5619. i := len(dAtA)
  5620. _ = i
  5621. var l int
  5622. _ = l
  5623. if m.SignedLastBlock {
  5624. i--
  5625. if m.SignedLastBlock {
  5626. dAtA[i] = 1
  5627. } else {
  5628. dAtA[i] = 0
  5629. }
  5630. i--
  5631. dAtA[i] = 0x10
  5632. }
  5633. {
  5634. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5635. if err != nil {
  5636. return 0, err
  5637. }
  5638. i -= size
  5639. i = encodeVarintTypes(dAtA, i, uint64(size))
  5640. }
  5641. i--
  5642. dAtA[i] = 0xa
  5643. return len(dAtA) - i, nil
  5644. }
  5645. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5646. size := m.Size()
  5647. dAtA = make([]byte, size)
  5648. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5649. if err != nil {
  5650. return nil, err
  5651. }
  5652. return dAtA[:n], nil
  5653. }
  5654. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5655. size := m.Size()
  5656. return m.MarshalToSizedBuffer(dAtA[:size])
  5657. }
  5658. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5659. i := len(dAtA)
  5660. _ = i
  5661. var l int
  5662. _ = l
  5663. if m.TotalVotingPower != 0 {
  5664. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5665. i--
  5666. dAtA[i] = 0x28
  5667. }
  5668. n47, err47 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5669. if err47 != nil {
  5670. return 0, err47
  5671. }
  5672. i -= n47
  5673. i = encodeVarintTypes(dAtA, i, uint64(n47))
  5674. i--
  5675. dAtA[i] = 0x22
  5676. if m.Height != 0 {
  5677. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5678. i--
  5679. dAtA[i] = 0x18
  5680. }
  5681. {
  5682. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5683. if err != nil {
  5684. return 0, err
  5685. }
  5686. i -= size
  5687. i = encodeVarintTypes(dAtA, i, uint64(size))
  5688. }
  5689. i--
  5690. dAtA[i] = 0x12
  5691. if m.Type != 0 {
  5692. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5693. i--
  5694. dAtA[i] = 0x8
  5695. }
  5696. return len(dAtA) - i, nil
  5697. }
  5698. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5699. size := m.Size()
  5700. dAtA = make([]byte, size)
  5701. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5702. if err != nil {
  5703. return nil, err
  5704. }
  5705. return dAtA[:n], nil
  5706. }
  5707. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5708. size := m.Size()
  5709. return m.MarshalToSizedBuffer(dAtA[:size])
  5710. }
  5711. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5712. i := len(dAtA)
  5713. _ = i
  5714. var l int
  5715. _ = l
  5716. if len(m.Metadata) > 0 {
  5717. i -= len(m.Metadata)
  5718. copy(dAtA[i:], m.Metadata)
  5719. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5720. i--
  5721. dAtA[i] = 0x2a
  5722. }
  5723. if len(m.Hash) > 0 {
  5724. i -= len(m.Hash)
  5725. copy(dAtA[i:], m.Hash)
  5726. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5727. i--
  5728. dAtA[i] = 0x22
  5729. }
  5730. if m.Chunks != 0 {
  5731. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5732. i--
  5733. dAtA[i] = 0x18
  5734. }
  5735. if m.Format != 0 {
  5736. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5737. i--
  5738. dAtA[i] = 0x10
  5739. }
  5740. if m.Height != 0 {
  5741. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5742. i--
  5743. dAtA[i] = 0x8
  5744. }
  5745. return len(dAtA) - i, nil
  5746. }
  5747. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5748. offset -= sovTypes(v)
  5749. base := offset
  5750. for v >= 1<<7 {
  5751. dAtA[offset] = uint8(v&0x7f | 0x80)
  5752. v >>= 7
  5753. offset++
  5754. }
  5755. dAtA[offset] = uint8(v)
  5756. return base
  5757. }
  5758. func (m *Request) Size() (n int) {
  5759. if m == nil {
  5760. return 0
  5761. }
  5762. var l int
  5763. _ = l
  5764. if m.Value != nil {
  5765. n += m.Value.Size()
  5766. }
  5767. return n
  5768. }
  5769. func (m *Request_Echo) Size() (n int) {
  5770. if m == nil {
  5771. return 0
  5772. }
  5773. var l int
  5774. _ = l
  5775. if m.Echo != nil {
  5776. l = m.Echo.Size()
  5777. n += 1 + l + sovTypes(uint64(l))
  5778. }
  5779. return n
  5780. }
  5781. func (m *Request_Flush) Size() (n int) {
  5782. if m == nil {
  5783. return 0
  5784. }
  5785. var l int
  5786. _ = l
  5787. if m.Flush != nil {
  5788. l = m.Flush.Size()
  5789. n += 1 + l + sovTypes(uint64(l))
  5790. }
  5791. return n
  5792. }
  5793. func (m *Request_Info) Size() (n int) {
  5794. if m == nil {
  5795. return 0
  5796. }
  5797. var l int
  5798. _ = l
  5799. if m.Info != nil {
  5800. l = m.Info.Size()
  5801. n += 1 + l + sovTypes(uint64(l))
  5802. }
  5803. return n
  5804. }
  5805. func (m *Request_InitChain) Size() (n int) {
  5806. if m == nil {
  5807. return 0
  5808. }
  5809. var l int
  5810. _ = l
  5811. if m.InitChain != nil {
  5812. l = m.InitChain.Size()
  5813. n += 1 + l + sovTypes(uint64(l))
  5814. }
  5815. return n
  5816. }
  5817. func (m *Request_Query) Size() (n int) {
  5818. if m == nil {
  5819. return 0
  5820. }
  5821. var l int
  5822. _ = l
  5823. if m.Query != nil {
  5824. l = m.Query.Size()
  5825. n += 1 + l + sovTypes(uint64(l))
  5826. }
  5827. return n
  5828. }
  5829. func (m *Request_BeginBlock) Size() (n int) {
  5830. if m == nil {
  5831. return 0
  5832. }
  5833. var l int
  5834. _ = l
  5835. if m.BeginBlock != nil {
  5836. l = m.BeginBlock.Size()
  5837. n += 1 + l + sovTypes(uint64(l))
  5838. }
  5839. return n
  5840. }
  5841. func (m *Request_CheckTx) Size() (n int) {
  5842. if m == nil {
  5843. return 0
  5844. }
  5845. var l int
  5846. _ = l
  5847. if m.CheckTx != nil {
  5848. l = m.CheckTx.Size()
  5849. n += 1 + l + sovTypes(uint64(l))
  5850. }
  5851. return n
  5852. }
  5853. func (m *Request_DeliverTx) Size() (n int) {
  5854. if m == nil {
  5855. return 0
  5856. }
  5857. var l int
  5858. _ = l
  5859. if m.DeliverTx != nil {
  5860. l = m.DeliverTx.Size()
  5861. n += 1 + l + sovTypes(uint64(l))
  5862. }
  5863. return n
  5864. }
  5865. func (m *Request_EndBlock) Size() (n int) {
  5866. if m == nil {
  5867. return 0
  5868. }
  5869. var l int
  5870. _ = l
  5871. if m.EndBlock != nil {
  5872. l = m.EndBlock.Size()
  5873. n += 1 + l + sovTypes(uint64(l))
  5874. }
  5875. return n
  5876. }
  5877. func (m *Request_Commit) Size() (n int) {
  5878. if m == nil {
  5879. return 0
  5880. }
  5881. var l int
  5882. _ = l
  5883. if m.Commit != nil {
  5884. l = m.Commit.Size()
  5885. n += 1 + l + sovTypes(uint64(l))
  5886. }
  5887. return n
  5888. }
  5889. func (m *Request_ListSnapshots) Size() (n int) {
  5890. if m == nil {
  5891. return 0
  5892. }
  5893. var l int
  5894. _ = l
  5895. if m.ListSnapshots != nil {
  5896. l = m.ListSnapshots.Size()
  5897. n += 1 + l + sovTypes(uint64(l))
  5898. }
  5899. return n
  5900. }
  5901. func (m *Request_OfferSnapshot) Size() (n int) {
  5902. if m == nil {
  5903. return 0
  5904. }
  5905. var l int
  5906. _ = l
  5907. if m.OfferSnapshot != nil {
  5908. l = m.OfferSnapshot.Size()
  5909. n += 1 + l + sovTypes(uint64(l))
  5910. }
  5911. return n
  5912. }
  5913. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5914. if m == nil {
  5915. return 0
  5916. }
  5917. var l int
  5918. _ = l
  5919. if m.LoadSnapshotChunk != nil {
  5920. l = m.LoadSnapshotChunk.Size()
  5921. n += 1 + l + sovTypes(uint64(l))
  5922. }
  5923. return n
  5924. }
  5925. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5926. if m == nil {
  5927. return 0
  5928. }
  5929. var l int
  5930. _ = l
  5931. if m.ApplySnapshotChunk != nil {
  5932. l = m.ApplySnapshotChunk.Size()
  5933. n += 1 + l + sovTypes(uint64(l))
  5934. }
  5935. return n
  5936. }
  5937. func (m *RequestEcho) Size() (n int) {
  5938. if m == nil {
  5939. return 0
  5940. }
  5941. var l int
  5942. _ = l
  5943. l = len(m.Message)
  5944. if l > 0 {
  5945. n += 1 + l + sovTypes(uint64(l))
  5946. }
  5947. return n
  5948. }
  5949. func (m *RequestFlush) Size() (n int) {
  5950. if m == nil {
  5951. return 0
  5952. }
  5953. var l int
  5954. _ = l
  5955. return n
  5956. }
  5957. func (m *RequestInfo) Size() (n int) {
  5958. if m == nil {
  5959. return 0
  5960. }
  5961. var l int
  5962. _ = l
  5963. l = len(m.Version)
  5964. if l > 0 {
  5965. n += 1 + l + sovTypes(uint64(l))
  5966. }
  5967. if m.BlockVersion != 0 {
  5968. n += 1 + sovTypes(uint64(m.BlockVersion))
  5969. }
  5970. if m.P2PVersion != 0 {
  5971. n += 1 + sovTypes(uint64(m.P2PVersion))
  5972. }
  5973. l = len(m.AbciVersion)
  5974. if l > 0 {
  5975. n += 1 + l + sovTypes(uint64(l))
  5976. }
  5977. return n
  5978. }
  5979. func (m *RequestInitChain) Size() (n int) {
  5980. if m == nil {
  5981. return 0
  5982. }
  5983. var l int
  5984. _ = l
  5985. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5986. n += 1 + l + sovTypes(uint64(l))
  5987. l = len(m.ChainId)
  5988. if l > 0 {
  5989. n += 1 + l + sovTypes(uint64(l))
  5990. }
  5991. if m.ConsensusParams != nil {
  5992. l = m.ConsensusParams.Size()
  5993. n += 1 + l + sovTypes(uint64(l))
  5994. }
  5995. if len(m.Validators) > 0 {
  5996. for _, e := range m.Validators {
  5997. l = e.Size()
  5998. n += 1 + l + sovTypes(uint64(l))
  5999. }
  6000. }
  6001. l = len(m.AppStateBytes)
  6002. if l > 0 {
  6003. n += 1 + l + sovTypes(uint64(l))
  6004. }
  6005. if m.InitialHeight != 0 {
  6006. n += 1 + sovTypes(uint64(m.InitialHeight))
  6007. }
  6008. return n
  6009. }
  6010. func (m *RequestQuery) Size() (n int) {
  6011. if m == nil {
  6012. return 0
  6013. }
  6014. var l int
  6015. _ = l
  6016. l = len(m.Data)
  6017. if l > 0 {
  6018. n += 1 + l + sovTypes(uint64(l))
  6019. }
  6020. l = len(m.Path)
  6021. if l > 0 {
  6022. n += 1 + l + sovTypes(uint64(l))
  6023. }
  6024. if m.Height != 0 {
  6025. n += 1 + sovTypes(uint64(m.Height))
  6026. }
  6027. if m.Prove {
  6028. n += 2
  6029. }
  6030. return n
  6031. }
  6032. func (m *RequestBeginBlock) Size() (n int) {
  6033. if m == nil {
  6034. return 0
  6035. }
  6036. var l int
  6037. _ = l
  6038. l = len(m.Hash)
  6039. if l > 0 {
  6040. n += 1 + l + sovTypes(uint64(l))
  6041. }
  6042. l = m.Header.Size()
  6043. n += 1 + l + sovTypes(uint64(l))
  6044. l = m.LastCommitInfo.Size()
  6045. n += 1 + l + sovTypes(uint64(l))
  6046. if len(m.ByzantineValidators) > 0 {
  6047. for _, e := range m.ByzantineValidators {
  6048. l = e.Size()
  6049. n += 1 + l + sovTypes(uint64(l))
  6050. }
  6051. }
  6052. return n
  6053. }
  6054. func (m *RequestCheckTx) Size() (n int) {
  6055. if m == nil {
  6056. return 0
  6057. }
  6058. var l int
  6059. _ = l
  6060. l = len(m.Tx)
  6061. if l > 0 {
  6062. n += 1 + l + sovTypes(uint64(l))
  6063. }
  6064. if m.Type != 0 {
  6065. n += 1 + sovTypes(uint64(m.Type))
  6066. }
  6067. return n
  6068. }
  6069. func (m *RequestDeliverTx) Size() (n int) {
  6070. if m == nil {
  6071. return 0
  6072. }
  6073. var l int
  6074. _ = l
  6075. l = len(m.Tx)
  6076. if l > 0 {
  6077. n += 1 + l + sovTypes(uint64(l))
  6078. }
  6079. return n
  6080. }
  6081. func (m *RequestEndBlock) Size() (n int) {
  6082. if m == nil {
  6083. return 0
  6084. }
  6085. var l int
  6086. _ = l
  6087. if m.Height != 0 {
  6088. n += 1 + sovTypes(uint64(m.Height))
  6089. }
  6090. return n
  6091. }
  6092. func (m *RequestCommit) Size() (n int) {
  6093. if m == nil {
  6094. return 0
  6095. }
  6096. var l int
  6097. _ = l
  6098. return n
  6099. }
  6100. func (m *RequestListSnapshots) Size() (n int) {
  6101. if m == nil {
  6102. return 0
  6103. }
  6104. var l int
  6105. _ = l
  6106. return n
  6107. }
  6108. func (m *RequestOfferSnapshot) Size() (n int) {
  6109. if m == nil {
  6110. return 0
  6111. }
  6112. var l int
  6113. _ = l
  6114. if m.Snapshot != nil {
  6115. l = m.Snapshot.Size()
  6116. n += 1 + l + sovTypes(uint64(l))
  6117. }
  6118. l = len(m.AppHash)
  6119. if l > 0 {
  6120. n += 1 + l + sovTypes(uint64(l))
  6121. }
  6122. return n
  6123. }
  6124. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  6125. if m == nil {
  6126. return 0
  6127. }
  6128. var l int
  6129. _ = l
  6130. if m.Height != 0 {
  6131. n += 1 + sovTypes(uint64(m.Height))
  6132. }
  6133. if m.Format != 0 {
  6134. n += 1 + sovTypes(uint64(m.Format))
  6135. }
  6136. if m.Chunk != 0 {
  6137. n += 1 + sovTypes(uint64(m.Chunk))
  6138. }
  6139. return n
  6140. }
  6141. func (m *RequestApplySnapshotChunk) Size() (n int) {
  6142. if m == nil {
  6143. return 0
  6144. }
  6145. var l int
  6146. _ = l
  6147. if m.Index != 0 {
  6148. n += 1 + sovTypes(uint64(m.Index))
  6149. }
  6150. l = len(m.Chunk)
  6151. if l > 0 {
  6152. n += 1 + l + sovTypes(uint64(l))
  6153. }
  6154. l = len(m.Sender)
  6155. if l > 0 {
  6156. n += 1 + l + sovTypes(uint64(l))
  6157. }
  6158. return n
  6159. }
  6160. func (m *Response) Size() (n int) {
  6161. if m == nil {
  6162. return 0
  6163. }
  6164. var l int
  6165. _ = l
  6166. if m.Value != nil {
  6167. n += m.Value.Size()
  6168. }
  6169. return n
  6170. }
  6171. func (m *Response_Exception) Size() (n int) {
  6172. if m == nil {
  6173. return 0
  6174. }
  6175. var l int
  6176. _ = l
  6177. if m.Exception != nil {
  6178. l = m.Exception.Size()
  6179. n += 1 + l + sovTypes(uint64(l))
  6180. }
  6181. return n
  6182. }
  6183. func (m *Response_Echo) Size() (n int) {
  6184. if m == nil {
  6185. return 0
  6186. }
  6187. var l int
  6188. _ = l
  6189. if m.Echo != nil {
  6190. l = m.Echo.Size()
  6191. n += 1 + l + sovTypes(uint64(l))
  6192. }
  6193. return n
  6194. }
  6195. func (m *Response_Flush) Size() (n int) {
  6196. if m == nil {
  6197. return 0
  6198. }
  6199. var l int
  6200. _ = l
  6201. if m.Flush != nil {
  6202. l = m.Flush.Size()
  6203. n += 1 + l + sovTypes(uint64(l))
  6204. }
  6205. return n
  6206. }
  6207. func (m *Response_Info) Size() (n int) {
  6208. if m == nil {
  6209. return 0
  6210. }
  6211. var l int
  6212. _ = l
  6213. if m.Info != nil {
  6214. l = m.Info.Size()
  6215. n += 1 + l + sovTypes(uint64(l))
  6216. }
  6217. return n
  6218. }
  6219. func (m *Response_InitChain) Size() (n int) {
  6220. if m == nil {
  6221. return 0
  6222. }
  6223. var l int
  6224. _ = l
  6225. if m.InitChain != nil {
  6226. l = m.InitChain.Size()
  6227. n += 1 + l + sovTypes(uint64(l))
  6228. }
  6229. return n
  6230. }
  6231. func (m *Response_Query) Size() (n int) {
  6232. if m == nil {
  6233. return 0
  6234. }
  6235. var l int
  6236. _ = l
  6237. if m.Query != nil {
  6238. l = m.Query.Size()
  6239. n += 1 + l + sovTypes(uint64(l))
  6240. }
  6241. return n
  6242. }
  6243. func (m *Response_BeginBlock) Size() (n int) {
  6244. if m == nil {
  6245. return 0
  6246. }
  6247. var l int
  6248. _ = l
  6249. if m.BeginBlock != nil {
  6250. l = m.BeginBlock.Size()
  6251. n += 1 + l + sovTypes(uint64(l))
  6252. }
  6253. return n
  6254. }
  6255. func (m *Response_CheckTx) Size() (n int) {
  6256. if m == nil {
  6257. return 0
  6258. }
  6259. var l int
  6260. _ = l
  6261. if m.CheckTx != nil {
  6262. l = m.CheckTx.Size()
  6263. n += 1 + l + sovTypes(uint64(l))
  6264. }
  6265. return n
  6266. }
  6267. func (m *Response_DeliverTx) Size() (n int) {
  6268. if m == nil {
  6269. return 0
  6270. }
  6271. var l int
  6272. _ = l
  6273. if m.DeliverTx != nil {
  6274. l = m.DeliverTx.Size()
  6275. n += 1 + l + sovTypes(uint64(l))
  6276. }
  6277. return n
  6278. }
  6279. func (m *Response_EndBlock) Size() (n int) {
  6280. if m == nil {
  6281. return 0
  6282. }
  6283. var l int
  6284. _ = l
  6285. if m.EndBlock != nil {
  6286. l = m.EndBlock.Size()
  6287. n += 1 + l + sovTypes(uint64(l))
  6288. }
  6289. return n
  6290. }
  6291. func (m *Response_Commit) Size() (n int) {
  6292. if m == nil {
  6293. return 0
  6294. }
  6295. var l int
  6296. _ = l
  6297. if m.Commit != nil {
  6298. l = m.Commit.Size()
  6299. n += 1 + l + sovTypes(uint64(l))
  6300. }
  6301. return n
  6302. }
  6303. func (m *Response_ListSnapshots) Size() (n int) {
  6304. if m == nil {
  6305. return 0
  6306. }
  6307. var l int
  6308. _ = l
  6309. if m.ListSnapshots != nil {
  6310. l = m.ListSnapshots.Size()
  6311. n += 1 + l + sovTypes(uint64(l))
  6312. }
  6313. return n
  6314. }
  6315. func (m *Response_OfferSnapshot) Size() (n int) {
  6316. if m == nil {
  6317. return 0
  6318. }
  6319. var l int
  6320. _ = l
  6321. if m.OfferSnapshot != nil {
  6322. l = m.OfferSnapshot.Size()
  6323. n += 1 + l + sovTypes(uint64(l))
  6324. }
  6325. return n
  6326. }
  6327. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6328. if m == nil {
  6329. return 0
  6330. }
  6331. var l int
  6332. _ = l
  6333. if m.LoadSnapshotChunk != nil {
  6334. l = m.LoadSnapshotChunk.Size()
  6335. n += 1 + l + sovTypes(uint64(l))
  6336. }
  6337. return n
  6338. }
  6339. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6340. if m == nil {
  6341. return 0
  6342. }
  6343. var l int
  6344. _ = l
  6345. if m.ApplySnapshotChunk != nil {
  6346. l = m.ApplySnapshotChunk.Size()
  6347. n += 1 + l + sovTypes(uint64(l))
  6348. }
  6349. return n
  6350. }
  6351. func (m *ResponseException) Size() (n int) {
  6352. if m == nil {
  6353. return 0
  6354. }
  6355. var l int
  6356. _ = l
  6357. l = len(m.Error)
  6358. if l > 0 {
  6359. n += 1 + l + sovTypes(uint64(l))
  6360. }
  6361. return n
  6362. }
  6363. func (m *ResponseEcho) Size() (n int) {
  6364. if m == nil {
  6365. return 0
  6366. }
  6367. var l int
  6368. _ = l
  6369. l = len(m.Message)
  6370. if l > 0 {
  6371. n += 1 + l + sovTypes(uint64(l))
  6372. }
  6373. return n
  6374. }
  6375. func (m *ResponseFlush) Size() (n int) {
  6376. if m == nil {
  6377. return 0
  6378. }
  6379. var l int
  6380. _ = l
  6381. return n
  6382. }
  6383. func (m *ResponseInfo) Size() (n int) {
  6384. if m == nil {
  6385. return 0
  6386. }
  6387. var l int
  6388. _ = l
  6389. l = len(m.Data)
  6390. if l > 0 {
  6391. n += 1 + l + sovTypes(uint64(l))
  6392. }
  6393. l = len(m.Version)
  6394. if l > 0 {
  6395. n += 1 + l + sovTypes(uint64(l))
  6396. }
  6397. if m.AppVersion != 0 {
  6398. n += 1 + sovTypes(uint64(m.AppVersion))
  6399. }
  6400. if m.LastBlockHeight != 0 {
  6401. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6402. }
  6403. l = len(m.LastBlockAppHash)
  6404. if l > 0 {
  6405. n += 1 + l + sovTypes(uint64(l))
  6406. }
  6407. return n
  6408. }
  6409. func (m *ResponseInitChain) Size() (n int) {
  6410. if m == nil {
  6411. return 0
  6412. }
  6413. var l int
  6414. _ = l
  6415. if m.ConsensusParams != nil {
  6416. l = m.ConsensusParams.Size()
  6417. n += 1 + l + sovTypes(uint64(l))
  6418. }
  6419. if len(m.Validators) > 0 {
  6420. for _, e := range m.Validators {
  6421. l = e.Size()
  6422. n += 1 + l + sovTypes(uint64(l))
  6423. }
  6424. }
  6425. l = len(m.AppHash)
  6426. if l > 0 {
  6427. n += 1 + l + sovTypes(uint64(l))
  6428. }
  6429. return n
  6430. }
  6431. func (m *ResponseQuery) Size() (n int) {
  6432. if m == nil {
  6433. return 0
  6434. }
  6435. var l int
  6436. _ = l
  6437. if m.Code != 0 {
  6438. n += 1 + sovTypes(uint64(m.Code))
  6439. }
  6440. l = len(m.Log)
  6441. if l > 0 {
  6442. n += 1 + l + sovTypes(uint64(l))
  6443. }
  6444. l = len(m.Info)
  6445. if l > 0 {
  6446. n += 1 + l + sovTypes(uint64(l))
  6447. }
  6448. if m.Index != 0 {
  6449. n += 1 + sovTypes(uint64(m.Index))
  6450. }
  6451. l = len(m.Key)
  6452. if l > 0 {
  6453. n += 1 + l + sovTypes(uint64(l))
  6454. }
  6455. l = len(m.Value)
  6456. if l > 0 {
  6457. n += 1 + l + sovTypes(uint64(l))
  6458. }
  6459. if m.ProofOps != nil {
  6460. l = m.ProofOps.Size()
  6461. n += 1 + l + sovTypes(uint64(l))
  6462. }
  6463. if m.Height != 0 {
  6464. n += 1 + sovTypes(uint64(m.Height))
  6465. }
  6466. l = len(m.Codespace)
  6467. if l > 0 {
  6468. n += 1 + l + sovTypes(uint64(l))
  6469. }
  6470. return n
  6471. }
  6472. func (m *ResponseBeginBlock) Size() (n int) {
  6473. if m == nil {
  6474. return 0
  6475. }
  6476. var l int
  6477. _ = l
  6478. if len(m.Events) > 0 {
  6479. for _, e := range m.Events {
  6480. l = e.Size()
  6481. n += 1 + l + sovTypes(uint64(l))
  6482. }
  6483. }
  6484. return n
  6485. }
  6486. func (m *ResponseCheckTx) Size() (n int) {
  6487. if m == nil {
  6488. return 0
  6489. }
  6490. var l int
  6491. _ = l
  6492. if m.Code != 0 {
  6493. n += 1 + sovTypes(uint64(m.Code))
  6494. }
  6495. l = len(m.Data)
  6496. if l > 0 {
  6497. n += 1 + l + sovTypes(uint64(l))
  6498. }
  6499. l = len(m.Log)
  6500. if l > 0 {
  6501. n += 1 + l + sovTypes(uint64(l))
  6502. }
  6503. l = len(m.Info)
  6504. if l > 0 {
  6505. n += 1 + l + sovTypes(uint64(l))
  6506. }
  6507. if m.GasWanted != 0 {
  6508. n += 1 + sovTypes(uint64(m.GasWanted))
  6509. }
  6510. if m.GasUsed != 0 {
  6511. n += 1 + sovTypes(uint64(m.GasUsed))
  6512. }
  6513. if len(m.Events) > 0 {
  6514. for _, e := range m.Events {
  6515. l = e.Size()
  6516. n += 1 + l + sovTypes(uint64(l))
  6517. }
  6518. }
  6519. l = len(m.Codespace)
  6520. if l > 0 {
  6521. n += 1 + l + sovTypes(uint64(l))
  6522. }
  6523. return n
  6524. }
  6525. func (m *ResponseDeliverTx) Size() (n int) {
  6526. if m == nil {
  6527. return 0
  6528. }
  6529. var l int
  6530. _ = l
  6531. if m.Code != 0 {
  6532. n += 1 + sovTypes(uint64(m.Code))
  6533. }
  6534. l = len(m.Data)
  6535. if l > 0 {
  6536. n += 1 + l + sovTypes(uint64(l))
  6537. }
  6538. l = len(m.Log)
  6539. if l > 0 {
  6540. n += 1 + l + sovTypes(uint64(l))
  6541. }
  6542. l = len(m.Info)
  6543. if l > 0 {
  6544. n += 1 + l + sovTypes(uint64(l))
  6545. }
  6546. if m.GasWanted != 0 {
  6547. n += 1 + sovTypes(uint64(m.GasWanted))
  6548. }
  6549. if m.GasUsed != 0 {
  6550. n += 1 + sovTypes(uint64(m.GasUsed))
  6551. }
  6552. if len(m.Events) > 0 {
  6553. for _, e := range m.Events {
  6554. l = e.Size()
  6555. n += 1 + l + sovTypes(uint64(l))
  6556. }
  6557. }
  6558. l = len(m.Codespace)
  6559. if l > 0 {
  6560. n += 1 + l + sovTypes(uint64(l))
  6561. }
  6562. return n
  6563. }
  6564. func (m *ResponseEndBlock) Size() (n int) {
  6565. if m == nil {
  6566. return 0
  6567. }
  6568. var l int
  6569. _ = l
  6570. if len(m.ValidatorUpdates) > 0 {
  6571. for _, e := range m.ValidatorUpdates {
  6572. l = e.Size()
  6573. n += 1 + l + sovTypes(uint64(l))
  6574. }
  6575. }
  6576. if m.ConsensusParamUpdates != nil {
  6577. l = m.ConsensusParamUpdates.Size()
  6578. n += 1 + l + sovTypes(uint64(l))
  6579. }
  6580. if len(m.Events) > 0 {
  6581. for _, e := range m.Events {
  6582. l = e.Size()
  6583. n += 1 + l + sovTypes(uint64(l))
  6584. }
  6585. }
  6586. return n
  6587. }
  6588. func (m *ResponseCommit) Size() (n int) {
  6589. if m == nil {
  6590. return 0
  6591. }
  6592. var l int
  6593. _ = l
  6594. l = len(m.Data)
  6595. if l > 0 {
  6596. n += 1 + l + sovTypes(uint64(l))
  6597. }
  6598. if m.RetainHeight != 0 {
  6599. n += 1 + sovTypes(uint64(m.RetainHeight))
  6600. }
  6601. return n
  6602. }
  6603. func (m *ResponseListSnapshots) Size() (n int) {
  6604. if m == nil {
  6605. return 0
  6606. }
  6607. var l int
  6608. _ = l
  6609. if len(m.Snapshots) > 0 {
  6610. for _, e := range m.Snapshots {
  6611. l = e.Size()
  6612. n += 1 + l + sovTypes(uint64(l))
  6613. }
  6614. }
  6615. return n
  6616. }
  6617. func (m *ResponseOfferSnapshot) Size() (n int) {
  6618. if m == nil {
  6619. return 0
  6620. }
  6621. var l int
  6622. _ = l
  6623. if m.Result != 0 {
  6624. n += 1 + sovTypes(uint64(m.Result))
  6625. }
  6626. return n
  6627. }
  6628. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6629. if m == nil {
  6630. return 0
  6631. }
  6632. var l int
  6633. _ = l
  6634. l = len(m.Chunk)
  6635. if l > 0 {
  6636. n += 1 + l + sovTypes(uint64(l))
  6637. }
  6638. return n
  6639. }
  6640. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6641. if m == nil {
  6642. return 0
  6643. }
  6644. var l int
  6645. _ = l
  6646. if m.Result != 0 {
  6647. n += 1 + sovTypes(uint64(m.Result))
  6648. }
  6649. if len(m.RefetchChunks) > 0 {
  6650. l = 0
  6651. for _, e := range m.RefetchChunks {
  6652. l += sovTypes(uint64(e))
  6653. }
  6654. n += 1 + sovTypes(uint64(l)) + l
  6655. }
  6656. if len(m.RejectSenders) > 0 {
  6657. for _, s := range m.RejectSenders {
  6658. l = len(s)
  6659. n += 1 + l + sovTypes(uint64(l))
  6660. }
  6661. }
  6662. return n
  6663. }
  6664. func (m *ConsensusParams) Size() (n int) {
  6665. if m == nil {
  6666. return 0
  6667. }
  6668. var l int
  6669. _ = l
  6670. if m.Block != nil {
  6671. l = m.Block.Size()
  6672. n += 1 + l + sovTypes(uint64(l))
  6673. }
  6674. if m.Evidence != nil {
  6675. l = m.Evidence.Size()
  6676. n += 1 + l + sovTypes(uint64(l))
  6677. }
  6678. if m.Validator != nil {
  6679. l = m.Validator.Size()
  6680. n += 1 + l + sovTypes(uint64(l))
  6681. }
  6682. if m.Version != nil {
  6683. l = m.Version.Size()
  6684. n += 1 + l + sovTypes(uint64(l))
  6685. }
  6686. return n
  6687. }
  6688. func (m *BlockParams) Size() (n int) {
  6689. if m == nil {
  6690. return 0
  6691. }
  6692. var l int
  6693. _ = l
  6694. if m.MaxBytes != 0 {
  6695. n += 1 + sovTypes(uint64(m.MaxBytes))
  6696. }
  6697. if m.MaxGas != 0 {
  6698. n += 1 + sovTypes(uint64(m.MaxGas))
  6699. }
  6700. return n
  6701. }
  6702. func (m *LastCommitInfo) Size() (n int) {
  6703. if m == nil {
  6704. return 0
  6705. }
  6706. var l int
  6707. _ = l
  6708. if m.Round != 0 {
  6709. n += 1 + sovTypes(uint64(m.Round))
  6710. }
  6711. if len(m.Votes) > 0 {
  6712. for _, e := range m.Votes {
  6713. l = e.Size()
  6714. n += 1 + l + sovTypes(uint64(l))
  6715. }
  6716. }
  6717. return n
  6718. }
  6719. func (m *Event) Size() (n int) {
  6720. if m == nil {
  6721. return 0
  6722. }
  6723. var l int
  6724. _ = l
  6725. l = len(m.Type)
  6726. if l > 0 {
  6727. n += 1 + l + sovTypes(uint64(l))
  6728. }
  6729. if len(m.Attributes) > 0 {
  6730. for _, e := range m.Attributes {
  6731. l = e.Size()
  6732. n += 1 + l + sovTypes(uint64(l))
  6733. }
  6734. }
  6735. return n
  6736. }
  6737. func (m *EventAttribute) Size() (n int) {
  6738. if m == nil {
  6739. return 0
  6740. }
  6741. var l int
  6742. _ = l
  6743. l = len(m.Key)
  6744. if l > 0 {
  6745. n += 1 + l + sovTypes(uint64(l))
  6746. }
  6747. l = len(m.Value)
  6748. if l > 0 {
  6749. n += 1 + l + sovTypes(uint64(l))
  6750. }
  6751. if m.Index {
  6752. n += 2
  6753. }
  6754. return n
  6755. }
  6756. func (m *TxResult) Size() (n int) {
  6757. if m == nil {
  6758. return 0
  6759. }
  6760. var l int
  6761. _ = l
  6762. if m.Height != 0 {
  6763. n += 1 + sovTypes(uint64(m.Height))
  6764. }
  6765. if m.Index != 0 {
  6766. n += 1 + sovTypes(uint64(m.Index))
  6767. }
  6768. l = len(m.Tx)
  6769. if l > 0 {
  6770. n += 1 + l + sovTypes(uint64(l))
  6771. }
  6772. l = m.Result.Size()
  6773. n += 1 + l + sovTypes(uint64(l))
  6774. return n
  6775. }
  6776. func (m *Validator) Size() (n int) {
  6777. if m == nil {
  6778. return 0
  6779. }
  6780. var l int
  6781. _ = l
  6782. l = len(m.Address)
  6783. if l > 0 {
  6784. n += 1 + l + sovTypes(uint64(l))
  6785. }
  6786. if m.Power != 0 {
  6787. n += 1 + sovTypes(uint64(m.Power))
  6788. }
  6789. return n
  6790. }
  6791. func (m *ValidatorUpdate) Size() (n int) {
  6792. if m == nil {
  6793. return 0
  6794. }
  6795. var l int
  6796. _ = l
  6797. l = m.PubKey.Size()
  6798. n += 1 + l + sovTypes(uint64(l))
  6799. if m.Power != 0 {
  6800. n += 1 + sovTypes(uint64(m.Power))
  6801. }
  6802. return n
  6803. }
  6804. func (m *VoteInfo) Size() (n int) {
  6805. if m == nil {
  6806. return 0
  6807. }
  6808. var l int
  6809. _ = l
  6810. l = m.Validator.Size()
  6811. n += 1 + l + sovTypes(uint64(l))
  6812. if m.SignedLastBlock {
  6813. n += 2
  6814. }
  6815. return n
  6816. }
  6817. func (m *Evidence) Size() (n int) {
  6818. if m == nil {
  6819. return 0
  6820. }
  6821. var l int
  6822. _ = l
  6823. if m.Type != 0 {
  6824. n += 1 + sovTypes(uint64(m.Type))
  6825. }
  6826. l = m.Validator.Size()
  6827. n += 1 + l + sovTypes(uint64(l))
  6828. if m.Height != 0 {
  6829. n += 1 + sovTypes(uint64(m.Height))
  6830. }
  6831. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6832. n += 1 + l + sovTypes(uint64(l))
  6833. if m.TotalVotingPower != 0 {
  6834. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6835. }
  6836. return n
  6837. }
  6838. func (m *Snapshot) Size() (n int) {
  6839. if m == nil {
  6840. return 0
  6841. }
  6842. var l int
  6843. _ = l
  6844. if m.Height != 0 {
  6845. n += 1 + sovTypes(uint64(m.Height))
  6846. }
  6847. if m.Format != 0 {
  6848. n += 1 + sovTypes(uint64(m.Format))
  6849. }
  6850. if m.Chunks != 0 {
  6851. n += 1 + sovTypes(uint64(m.Chunks))
  6852. }
  6853. l = len(m.Hash)
  6854. if l > 0 {
  6855. n += 1 + l + sovTypes(uint64(l))
  6856. }
  6857. l = len(m.Metadata)
  6858. if l > 0 {
  6859. n += 1 + l + sovTypes(uint64(l))
  6860. }
  6861. return n
  6862. }
  6863. func sovTypes(x uint64) (n int) {
  6864. return (math_bits.Len64(x|1) + 6) / 7
  6865. }
  6866. func sozTypes(x uint64) (n int) {
  6867. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6868. }
  6869. func (m *Request) Unmarshal(dAtA []byte) error {
  6870. l := len(dAtA)
  6871. iNdEx := 0
  6872. for iNdEx < l {
  6873. preIndex := iNdEx
  6874. var wire uint64
  6875. for shift := uint(0); ; shift += 7 {
  6876. if shift >= 64 {
  6877. return ErrIntOverflowTypes
  6878. }
  6879. if iNdEx >= l {
  6880. return io.ErrUnexpectedEOF
  6881. }
  6882. b := dAtA[iNdEx]
  6883. iNdEx++
  6884. wire |= uint64(b&0x7F) << shift
  6885. if b < 0x80 {
  6886. break
  6887. }
  6888. }
  6889. fieldNum := int32(wire >> 3)
  6890. wireType := int(wire & 0x7)
  6891. if wireType == 4 {
  6892. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6893. }
  6894. if fieldNum <= 0 {
  6895. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6896. }
  6897. switch fieldNum {
  6898. case 1:
  6899. if wireType != 2 {
  6900. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6901. }
  6902. var msglen int
  6903. for shift := uint(0); ; shift += 7 {
  6904. if shift >= 64 {
  6905. return ErrIntOverflowTypes
  6906. }
  6907. if iNdEx >= l {
  6908. return io.ErrUnexpectedEOF
  6909. }
  6910. b := dAtA[iNdEx]
  6911. iNdEx++
  6912. msglen |= int(b&0x7F) << shift
  6913. if b < 0x80 {
  6914. break
  6915. }
  6916. }
  6917. if msglen < 0 {
  6918. return ErrInvalidLengthTypes
  6919. }
  6920. postIndex := iNdEx + msglen
  6921. if postIndex < 0 {
  6922. return ErrInvalidLengthTypes
  6923. }
  6924. if postIndex > l {
  6925. return io.ErrUnexpectedEOF
  6926. }
  6927. v := &RequestEcho{}
  6928. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6929. return err
  6930. }
  6931. m.Value = &Request_Echo{v}
  6932. iNdEx = postIndex
  6933. case 2:
  6934. if wireType != 2 {
  6935. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6936. }
  6937. var msglen int
  6938. for shift := uint(0); ; shift += 7 {
  6939. if shift >= 64 {
  6940. return ErrIntOverflowTypes
  6941. }
  6942. if iNdEx >= l {
  6943. return io.ErrUnexpectedEOF
  6944. }
  6945. b := dAtA[iNdEx]
  6946. iNdEx++
  6947. msglen |= int(b&0x7F) << shift
  6948. if b < 0x80 {
  6949. break
  6950. }
  6951. }
  6952. if msglen < 0 {
  6953. return ErrInvalidLengthTypes
  6954. }
  6955. postIndex := iNdEx + msglen
  6956. if postIndex < 0 {
  6957. return ErrInvalidLengthTypes
  6958. }
  6959. if postIndex > l {
  6960. return io.ErrUnexpectedEOF
  6961. }
  6962. v := &RequestFlush{}
  6963. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6964. return err
  6965. }
  6966. m.Value = &Request_Flush{v}
  6967. iNdEx = postIndex
  6968. case 3:
  6969. if wireType != 2 {
  6970. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6971. }
  6972. var msglen int
  6973. for shift := uint(0); ; shift += 7 {
  6974. if shift >= 64 {
  6975. return ErrIntOverflowTypes
  6976. }
  6977. if iNdEx >= l {
  6978. return io.ErrUnexpectedEOF
  6979. }
  6980. b := dAtA[iNdEx]
  6981. iNdEx++
  6982. msglen |= int(b&0x7F) << shift
  6983. if b < 0x80 {
  6984. break
  6985. }
  6986. }
  6987. if msglen < 0 {
  6988. return ErrInvalidLengthTypes
  6989. }
  6990. postIndex := iNdEx + msglen
  6991. if postIndex < 0 {
  6992. return ErrInvalidLengthTypes
  6993. }
  6994. if postIndex > l {
  6995. return io.ErrUnexpectedEOF
  6996. }
  6997. v := &RequestInfo{}
  6998. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6999. return err
  7000. }
  7001. m.Value = &Request_Info{v}
  7002. iNdEx = postIndex
  7003. case 4:
  7004. if wireType != 2 {
  7005. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  7006. }
  7007. var msglen int
  7008. for shift := uint(0); ; shift += 7 {
  7009. if shift >= 64 {
  7010. return ErrIntOverflowTypes
  7011. }
  7012. if iNdEx >= l {
  7013. return io.ErrUnexpectedEOF
  7014. }
  7015. b := dAtA[iNdEx]
  7016. iNdEx++
  7017. msglen |= int(b&0x7F) << shift
  7018. if b < 0x80 {
  7019. break
  7020. }
  7021. }
  7022. if msglen < 0 {
  7023. return ErrInvalidLengthTypes
  7024. }
  7025. postIndex := iNdEx + msglen
  7026. if postIndex < 0 {
  7027. return ErrInvalidLengthTypes
  7028. }
  7029. if postIndex > l {
  7030. return io.ErrUnexpectedEOF
  7031. }
  7032. v := &RequestInitChain{}
  7033. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7034. return err
  7035. }
  7036. m.Value = &Request_InitChain{v}
  7037. iNdEx = postIndex
  7038. case 5:
  7039. if wireType != 2 {
  7040. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  7041. }
  7042. var msglen int
  7043. for shift := uint(0); ; shift += 7 {
  7044. if shift >= 64 {
  7045. return ErrIntOverflowTypes
  7046. }
  7047. if iNdEx >= l {
  7048. return io.ErrUnexpectedEOF
  7049. }
  7050. b := dAtA[iNdEx]
  7051. iNdEx++
  7052. msglen |= int(b&0x7F) << shift
  7053. if b < 0x80 {
  7054. break
  7055. }
  7056. }
  7057. if msglen < 0 {
  7058. return ErrInvalidLengthTypes
  7059. }
  7060. postIndex := iNdEx + msglen
  7061. if postIndex < 0 {
  7062. return ErrInvalidLengthTypes
  7063. }
  7064. if postIndex > l {
  7065. return io.ErrUnexpectedEOF
  7066. }
  7067. v := &RequestQuery{}
  7068. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7069. return err
  7070. }
  7071. m.Value = &Request_Query{v}
  7072. iNdEx = postIndex
  7073. case 6:
  7074. if wireType != 2 {
  7075. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  7076. }
  7077. var msglen int
  7078. for shift := uint(0); ; shift += 7 {
  7079. if shift >= 64 {
  7080. return ErrIntOverflowTypes
  7081. }
  7082. if iNdEx >= l {
  7083. return io.ErrUnexpectedEOF
  7084. }
  7085. b := dAtA[iNdEx]
  7086. iNdEx++
  7087. msglen |= int(b&0x7F) << shift
  7088. if b < 0x80 {
  7089. break
  7090. }
  7091. }
  7092. if msglen < 0 {
  7093. return ErrInvalidLengthTypes
  7094. }
  7095. postIndex := iNdEx + msglen
  7096. if postIndex < 0 {
  7097. return ErrInvalidLengthTypes
  7098. }
  7099. if postIndex > l {
  7100. return io.ErrUnexpectedEOF
  7101. }
  7102. v := &RequestBeginBlock{}
  7103. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7104. return err
  7105. }
  7106. m.Value = &Request_BeginBlock{v}
  7107. iNdEx = postIndex
  7108. case 7:
  7109. if wireType != 2 {
  7110. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  7111. }
  7112. var msglen int
  7113. for shift := uint(0); ; shift += 7 {
  7114. if shift >= 64 {
  7115. return ErrIntOverflowTypes
  7116. }
  7117. if iNdEx >= l {
  7118. return io.ErrUnexpectedEOF
  7119. }
  7120. b := dAtA[iNdEx]
  7121. iNdEx++
  7122. msglen |= int(b&0x7F) << shift
  7123. if b < 0x80 {
  7124. break
  7125. }
  7126. }
  7127. if msglen < 0 {
  7128. return ErrInvalidLengthTypes
  7129. }
  7130. postIndex := iNdEx + msglen
  7131. if postIndex < 0 {
  7132. return ErrInvalidLengthTypes
  7133. }
  7134. if postIndex > l {
  7135. return io.ErrUnexpectedEOF
  7136. }
  7137. v := &RequestCheckTx{}
  7138. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7139. return err
  7140. }
  7141. m.Value = &Request_CheckTx{v}
  7142. iNdEx = postIndex
  7143. case 8:
  7144. if wireType != 2 {
  7145. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  7146. }
  7147. var msglen int
  7148. for shift := uint(0); ; shift += 7 {
  7149. if shift >= 64 {
  7150. return ErrIntOverflowTypes
  7151. }
  7152. if iNdEx >= l {
  7153. return io.ErrUnexpectedEOF
  7154. }
  7155. b := dAtA[iNdEx]
  7156. iNdEx++
  7157. msglen |= int(b&0x7F) << shift
  7158. if b < 0x80 {
  7159. break
  7160. }
  7161. }
  7162. if msglen < 0 {
  7163. return ErrInvalidLengthTypes
  7164. }
  7165. postIndex := iNdEx + msglen
  7166. if postIndex < 0 {
  7167. return ErrInvalidLengthTypes
  7168. }
  7169. if postIndex > l {
  7170. return io.ErrUnexpectedEOF
  7171. }
  7172. v := &RequestDeliverTx{}
  7173. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7174. return err
  7175. }
  7176. m.Value = &Request_DeliverTx{v}
  7177. iNdEx = postIndex
  7178. case 9:
  7179. if wireType != 2 {
  7180. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  7181. }
  7182. var msglen int
  7183. for shift := uint(0); ; shift += 7 {
  7184. if shift >= 64 {
  7185. return ErrIntOverflowTypes
  7186. }
  7187. if iNdEx >= l {
  7188. return io.ErrUnexpectedEOF
  7189. }
  7190. b := dAtA[iNdEx]
  7191. iNdEx++
  7192. msglen |= int(b&0x7F) << shift
  7193. if b < 0x80 {
  7194. break
  7195. }
  7196. }
  7197. if msglen < 0 {
  7198. return ErrInvalidLengthTypes
  7199. }
  7200. postIndex := iNdEx + msglen
  7201. if postIndex < 0 {
  7202. return ErrInvalidLengthTypes
  7203. }
  7204. if postIndex > l {
  7205. return io.ErrUnexpectedEOF
  7206. }
  7207. v := &RequestEndBlock{}
  7208. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7209. return err
  7210. }
  7211. m.Value = &Request_EndBlock{v}
  7212. iNdEx = postIndex
  7213. case 10:
  7214. if wireType != 2 {
  7215. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7216. }
  7217. var msglen int
  7218. for shift := uint(0); ; shift += 7 {
  7219. if shift >= 64 {
  7220. return ErrIntOverflowTypes
  7221. }
  7222. if iNdEx >= l {
  7223. return io.ErrUnexpectedEOF
  7224. }
  7225. b := dAtA[iNdEx]
  7226. iNdEx++
  7227. msglen |= int(b&0x7F) << shift
  7228. if b < 0x80 {
  7229. break
  7230. }
  7231. }
  7232. if msglen < 0 {
  7233. return ErrInvalidLengthTypes
  7234. }
  7235. postIndex := iNdEx + msglen
  7236. if postIndex < 0 {
  7237. return ErrInvalidLengthTypes
  7238. }
  7239. if postIndex > l {
  7240. return io.ErrUnexpectedEOF
  7241. }
  7242. v := &RequestCommit{}
  7243. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7244. return err
  7245. }
  7246. m.Value = &Request_Commit{v}
  7247. iNdEx = postIndex
  7248. case 11:
  7249. if wireType != 2 {
  7250. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7251. }
  7252. var msglen int
  7253. for shift := uint(0); ; shift += 7 {
  7254. if shift >= 64 {
  7255. return ErrIntOverflowTypes
  7256. }
  7257. if iNdEx >= l {
  7258. return io.ErrUnexpectedEOF
  7259. }
  7260. b := dAtA[iNdEx]
  7261. iNdEx++
  7262. msglen |= int(b&0x7F) << shift
  7263. if b < 0x80 {
  7264. break
  7265. }
  7266. }
  7267. if msglen < 0 {
  7268. return ErrInvalidLengthTypes
  7269. }
  7270. postIndex := iNdEx + msglen
  7271. if postIndex < 0 {
  7272. return ErrInvalidLengthTypes
  7273. }
  7274. if postIndex > l {
  7275. return io.ErrUnexpectedEOF
  7276. }
  7277. v := &RequestListSnapshots{}
  7278. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7279. return err
  7280. }
  7281. m.Value = &Request_ListSnapshots{v}
  7282. iNdEx = postIndex
  7283. case 12:
  7284. if wireType != 2 {
  7285. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7286. }
  7287. var msglen int
  7288. for shift := uint(0); ; shift += 7 {
  7289. if shift >= 64 {
  7290. return ErrIntOverflowTypes
  7291. }
  7292. if iNdEx >= l {
  7293. return io.ErrUnexpectedEOF
  7294. }
  7295. b := dAtA[iNdEx]
  7296. iNdEx++
  7297. msglen |= int(b&0x7F) << shift
  7298. if b < 0x80 {
  7299. break
  7300. }
  7301. }
  7302. if msglen < 0 {
  7303. return ErrInvalidLengthTypes
  7304. }
  7305. postIndex := iNdEx + msglen
  7306. if postIndex < 0 {
  7307. return ErrInvalidLengthTypes
  7308. }
  7309. if postIndex > l {
  7310. return io.ErrUnexpectedEOF
  7311. }
  7312. v := &RequestOfferSnapshot{}
  7313. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7314. return err
  7315. }
  7316. m.Value = &Request_OfferSnapshot{v}
  7317. iNdEx = postIndex
  7318. case 13:
  7319. if wireType != 2 {
  7320. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7321. }
  7322. var msglen int
  7323. for shift := uint(0); ; shift += 7 {
  7324. if shift >= 64 {
  7325. return ErrIntOverflowTypes
  7326. }
  7327. if iNdEx >= l {
  7328. return io.ErrUnexpectedEOF
  7329. }
  7330. b := dAtA[iNdEx]
  7331. iNdEx++
  7332. msglen |= int(b&0x7F) << shift
  7333. if b < 0x80 {
  7334. break
  7335. }
  7336. }
  7337. if msglen < 0 {
  7338. return ErrInvalidLengthTypes
  7339. }
  7340. postIndex := iNdEx + msglen
  7341. if postIndex < 0 {
  7342. return ErrInvalidLengthTypes
  7343. }
  7344. if postIndex > l {
  7345. return io.ErrUnexpectedEOF
  7346. }
  7347. v := &RequestLoadSnapshotChunk{}
  7348. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7349. return err
  7350. }
  7351. m.Value = &Request_LoadSnapshotChunk{v}
  7352. iNdEx = postIndex
  7353. case 14:
  7354. if wireType != 2 {
  7355. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7356. }
  7357. var msglen int
  7358. for shift := uint(0); ; shift += 7 {
  7359. if shift >= 64 {
  7360. return ErrIntOverflowTypes
  7361. }
  7362. if iNdEx >= l {
  7363. return io.ErrUnexpectedEOF
  7364. }
  7365. b := dAtA[iNdEx]
  7366. iNdEx++
  7367. msglen |= int(b&0x7F) << shift
  7368. if b < 0x80 {
  7369. break
  7370. }
  7371. }
  7372. if msglen < 0 {
  7373. return ErrInvalidLengthTypes
  7374. }
  7375. postIndex := iNdEx + msglen
  7376. if postIndex < 0 {
  7377. return ErrInvalidLengthTypes
  7378. }
  7379. if postIndex > l {
  7380. return io.ErrUnexpectedEOF
  7381. }
  7382. v := &RequestApplySnapshotChunk{}
  7383. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7384. return err
  7385. }
  7386. m.Value = &Request_ApplySnapshotChunk{v}
  7387. iNdEx = postIndex
  7388. default:
  7389. iNdEx = preIndex
  7390. skippy, err := skipTypes(dAtA[iNdEx:])
  7391. if err != nil {
  7392. return err
  7393. }
  7394. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7395. return ErrInvalidLengthTypes
  7396. }
  7397. if (iNdEx + skippy) > l {
  7398. return io.ErrUnexpectedEOF
  7399. }
  7400. iNdEx += skippy
  7401. }
  7402. }
  7403. if iNdEx > l {
  7404. return io.ErrUnexpectedEOF
  7405. }
  7406. return nil
  7407. }
  7408. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7409. l := len(dAtA)
  7410. iNdEx := 0
  7411. for iNdEx < l {
  7412. preIndex := iNdEx
  7413. var wire uint64
  7414. for shift := uint(0); ; shift += 7 {
  7415. if shift >= 64 {
  7416. return ErrIntOverflowTypes
  7417. }
  7418. if iNdEx >= l {
  7419. return io.ErrUnexpectedEOF
  7420. }
  7421. b := dAtA[iNdEx]
  7422. iNdEx++
  7423. wire |= uint64(b&0x7F) << shift
  7424. if b < 0x80 {
  7425. break
  7426. }
  7427. }
  7428. fieldNum := int32(wire >> 3)
  7429. wireType := int(wire & 0x7)
  7430. if wireType == 4 {
  7431. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7432. }
  7433. if fieldNum <= 0 {
  7434. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7435. }
  7436. switch fieldNum {
  7437. case 1:
  7438. if wireType != 2 {
  7439. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7440. }
  7441. var stringLen uint64
  7442. for shift := uint(0); ; shift += 7 {
  7443. if shift >= 64 {
  7444. return ErrIntOverflowTypes
  7445. }
  7446. if iNdEx >= l {
  7447. return io.ErrUnexpectedEOF
  7448. }
  7449. b := dAtA[iNdEx]
  7450. iNdEx++
  7451. stringLen |= uint64(b&0x7F) << shift
  7452. if b < 0x80 {
  7453. break
  7454. }
  7455. }
  7456. intStringLen := int(stringLen)
  7457. if intStringLen < 0 {
  7458. return ErrInvalidLengthTypes
  7459. }
  7460. postIndex := iNdEx + intStringLen
  7461. if postIndex < 0 {
  7462. return ErrInvalidLengthTypes
  7463. }
  7464. if postIndex > l {
  7465. return io.ErrUnexpectedEOF
  7466. }
  7467. m.Message = string(dAtA[iNdEx:postIndex])
  7468. iNdEx = postIndex
  7469. default:
  7470. iNdEx = preIndex
  7471. skippy, err := skipTypes(dAtA[iNdEx:])
  7472. if err != nil {
  7473. return err
  7474. }
  7475. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7476. return ErrInvalidLengthTypes
  7477. }
  7478. if (iNdEx + skippy) > l {
  7479. return io.ErrUnexpectedEOF
  7480. }
  7481. iNdEx += skippy
  7482. }
  7483. }
  7484. if iNdEx > l {
  7485. return io.ErrUnexpectedEOF
  7486. }
  7487. return nil
  7488. }
  7489. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7490. l := len(dAtA)
  7491. iNdEx := 0
  7492. for iNdEx < l {
  7493. preIndex := iNdEx
  7494. var wire uint64
  7495. for shift := uint(0); ; shift += 7 {
  7496. if shift >= 64 {
  7497. return ErrIntOverflowTypes
  7498. }
  7499. if iNdEx >= l {
  7500. return io.ErrUnexpectedEOF
  7501. }
  7502. b := dAtA[iNdEx]
  7503. iNdEx++
  7504. wire |= uint64(b&0x7F) << shift
  7505. if b < 0x80 {
  7506. break
  7507. }
  7508. }
  7509. fieldNum := int32(wire >> 3)
  7510. wireType := int(wire & 0x7)
  7511. if wireType == 4 {
  7512. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7513. }
  7514. if fieldNum <= 0 {
  7515. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7516. }
  7517. switch fieldNum {
  7518. default:
  7519. iNdEx = preIndex
  7520. skippy, err := skipTypes(dAtA[iNdEx:])
  7521. if err != nil {
  7522. return err
  7523. }
  7524. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7525. return ErrInvalidLengthTypes
  7526. }
  7527. if (iNdEx + skippy) > l {
  7528. return io.ErrUnexpectedEOF
  7529. }
  7530. iNdEx += skippy
  7531. }
  7532. }
  7533. if iNdEx > l {
  7534. return io.ErrUnexpectedEOF
  7535. }
  7536. return nil
  7537. }
  7538. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7539. l := len(dAtA)
  7540. iNdEx := 0
  7541. for iNdEx < l {
  7542. preIndex := iNdEx
  7543. var wire uint64
  7544. for shift := uint(0); ; shift += 7 {
  7545. if shift >= 64 {
  7546. return ErrIntOverflowTypes
  7547. }
  7548. if iNdEx >= l {
  7549. return io.ErrUnexpectedEOF
  7550. }
  7551. b := dAtA[iNdEx]
  7552. iNdEx++
  7553. wire |= uint64(b&0x7F) << shift
  7554. if b < 0x80 {
  7555. break
  7556. }
  7557. }
  7558. fieldNum := int32(wire >> 3)
  7559. wireType := int(wire & 0x7)
  7560. if wireType == 4 {
  7561. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7562. }
  7563. if fieldNum <= 0 {
  7564. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7565. }
  7566. switch fieldNum {
  7567. case 1:
  7568. if wireType != 2 {
  7569. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7570. }
  7571. var stringLen uint64
  7572. for shift := uint(0); ; shift += 7 {
  7573. if shift >= 64 {
  7574. return ErrIntOverflowTypes
  7575. }
  7576. if iNdEx >= l {
  7577. return io.ErrUnexpectedEOF
  7578. }
  7579. b := dAtA[iNdEx]
  7580. iNdEx++
  7581. stringLen |= uint64(b&0x7F) << shift
  7582. if b < 0x80 {
  7583. break
  7584. }
  7585. }
  7586. intStringLen := int(stringLen)
  7587. if intStringLen < 0 {
  7588. return ErrInvalidLengthTypes
  7589. }
  7590. postIndex := iNdEx + intStringLen
  7591. if postIndex < 0 {
  7592. return ErrInvalidLengthTypes
  7593. }
  7594. if postIndex > l {
  7595. return io.ErrUnexpectedEOF
  7596. }
  7597. m.Version = string(dAtA[iNdEx:postIndex])
  7598. iNdEx = postIndex
  7599. case 2:
  7600. if wireType != 0 {
  7601. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7602. }
  7603. m.BlockVersion = 0
  7604. for shift := uint(0); ; shift += 7 {
  7605. if shift >= 64 {
  7606. return ErrIntOverflowTypes
  7607. }
  7608. if iNdEx >= l {
  7609. return io.ErrUnexpectedEOF
  7610. }
  7611. b := dAtA[iNdEx]
  7612. iNdEx++
  7613. m.BlockVersion |= uint64(b&0x7F) << shift
  7614. if b < 0x80 {
  7615. break
  7616. }
  7617. }
  7618. case 3:
  7619. if wireType != 0 {
  7620. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7621. }
  7622. m.P2PVersion = 0
  7623. for shift := uint(0); ; shift += 7 {
  7624. if shift >= 64 {
  7625. return ErrIntOverflowTypes
  7626. }
  7627. if iNdEx >= l {
  7628. return io.ErrUnexpectedEOF
  7629. }
  7630. b := dAtA[iNdEx]
  7631. iNdEx++
  7632. m.P2PVersion |= uint64(b&0x7F) << shift
  7633. if b < 0x80 {
  7634. break
  7635. }
  7636. }
  7637. case 4:
  7638. if wireType != 2 {
  7639. return fmt.Errorf("proto: wrong wireType = %d for field AbciVersion", wireType)
  7640. }
  7641. var stringLen uint64
  7642. for shift := uint(0); ; shift += 7 {
  7643. if shift >= 64 {
  7644. return ErrIntOverflowTypes
  7645. }
  7646. if iNdEx >= l {
  7647. return io.ErrUnexpectedEOF
  7648. }
  7649. b := dAtA[iNdEx]
  7650. iNdEx++
  7651. stringLen |= uint64(b&0x7F) << shift
  7652. if b < 0x80 {
  7653. break
  7654. }
  7655. }
  7656. intStringLen := int(stringLen)
  7657. if intStringLen < 0 {
  7658. return ErrInvalidLengthTypes
  7659. }
  7660. postIndex := iNdEx + intStringLen
  7661. if postIndex < 0 {
  7662. return ErrInvalidLengthTypes
  7663. }
  7664. if postIndex > l {
  7665. return io.ErrUnexpectedEOF
  7666. }
  7667. m.AbciVersion = string(dAtA[iNdEx:postIndex])
  7668. iNdEx = postIndex
  7669. default:
  7670. iNdEx = preIndex
  7671. skippy, err := skipTypes(dAtA[iNdEx:])
  7672. if err != nil {
  7673. return err
  7674. }
  7675. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7676. return ErrInvalidLengthTypes
  7677. }
  7678. if (iNdEx + skippy) > l {
  7679. return io.ErrUnexpectedEOF
  7680. }
  7681. iNdEx += skippy
  7682. }
  7683. }
  7684. if iNdEx > l {
  7685. return io.ErrUnexpectedEOF
  7686. }
  7687. return nil
  7688. }
  7689. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7690. l := len(dAtA)
  7691. iNdEx := 0
  7692. for iNdEx < l {
  7693. preIndex := iNdEx
  7694. var wire uint64
  7695. for shift := uint(0); ; shift += 7 {
  7696. if shift >= 64 {
  7697. return ErrIntOverflowTypes
  7698. }
  7699. if iNdEx >= l {
  7700. return io.ErrUnexpectedEOF
  7701. }
  7702. b := dAtA[iNdEx]
  7703. iNdEx++
  7704. wire |= uint64(b&0x7F) << shift
  7705. if b < 0x80 {
  7706. break
  7707. }
  7708. }
  7709. fieldNum := int32(wire >> 3)
  7710. wireType := int(wire & 0x7)
  7711. if wireType == 4 {
  7712. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7713. }
  7714. if fieldNum <= 0 {
  7715. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7716. }
  7717. switch fieldNum {
  7718. case 1:
  7719. if wireType != 2 {
  7720. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7721. }
  7722. var msglen int
  7723. for shift := uint(0); ; shift += 7 {
  7724. if shift >= 64 {
  7725. return ErrIntOverflowTypes
  7726. }
  7727. if iNdEx >= l {
  7728. return io.ErrUnexpectedEOF
  7729. }
  7730. b := dAtA[iNdEx]
  7731. iNdEx++
  7732. msglen |= int(b&0x7F) << shift
  7733. if b < 0x80 {
  7734. break
  7735. }
  7736. }
  7737. if msglen < 0 {
  7738. return ErrInvalidLengthTypes
  7739. }
  7740. postIndex := iNdEx + msglen
  7741. if postIndex < 0 {
  7742. return ErrInvalidLengthTypes
  7743. }
  7744. if postIndex > l {
  7745. return io.ErrUnexpectedEOF
  7746. }
  7747. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7748. return err
  7749. }
  7750. iNdEx = postIndex
  7751. case 2:
  7752. if wireType != 2 {
  7753. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7754. }
  7755. var stringLen uint64
  7756. for shift := uint(0); ; shift += 7 {
  7757. if shift >= 64 {
  7758. return ErrIntOverflowTypes
  7759. }
  7760. if iNdEx >= l {
  7761. return io.ErrUnexpectedEOF
  7762. }
  7763. b := dAtA[iNdEx]
  7764. iNdEx++
  7765. stringLen |= uint64(b&0x7F) << shift
  7766. if b < 0x80 {
  7767. break
  7768. }
  7769. }
  7770. intStringLen := int(stringLen)
  7771. if intStringLen < 0 {
  7772. return ErrInvalidLengthTypes
  7773. }
  7774. postIndex := iNdEx + intStringLen
  7775. if postIndex < 0 {
  7776. return ErrInvalidLengthTypes
  7777. }
  7778. if postIndex > l {
  7779. return io.ErrUnexpectedEOF
  7780. }
  7781. m.ChainId = string(dAtA[iNdEx:postIndex])
  7782. iNdEx = postIndex
  7783. case 3:
  7784. if wireType != 2 {
  7785. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7786. }
  7787. var msglen int
  7788. for shift := uint(0); ; shift += 7 {
  7789. if shift >= 64 {
  7790. return ErrIntOverflowTypes
  7791. }
  7792. if iNdEx >= l {
  7793. return io.ErrUnexpectedEOF
  7794. }
  7795. b := dAtA[iNdEx]
  7796. iNdEx++
  7797. msglen |= int(b&0x7F) << shift
  7798. if b < 0x80 {
  7799. break
  7800. }
  7801. }
  7802. if msglen < 0 {
  7803. return ErrInvalidLengthTypes
  7804. }
  7805. postIndex := iNdEx + msglen
  7806. if postIndex < 0 {
  7807. return ErrInvalidLengthTypes
  7808. }
  7809. if postIndex > l {
  7810. return io.ErrUnexpectedEOF
  7811. }
  7812. if m.ConsensusParams == nil {
  7813. m.ConsensusParams = &ConsensusParams{}
  7814. }
  7815. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7816. return err
  7817. }
  7818. iNdEx = postIndex
  7819. case 4:
  7820. if wireType != 2 {
  7821. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7822. }
  7823. var msglen int
  7824. for shift := uint(0); ; shift += 7 {
  7825. if shift >= 64 {
  7826. return ErrIntOverflowTypes
  7827. }
  7828. if iNdEx >= l {
  7829. return io.ErrUnexpectedEOF
  7830. }
  7831. b := dAtA[iNdEx]
  7832. iNdEx++
  7833. msglen |= int(b&0x7F) << shift
  7834. if b < 0x80 {
  7835. break
  7836. }
  7837. }
  7838. if msglen < 0 {
  7839. return ErrInvalidLengthTypes
  7840. }
  7841. postIndex := iNdEx + msglen
  7842. if postIndex < 0 {
  7843. return ErrInvalidLengthTypes
  7844. }
  7845. if postIndex > l {
  7846. return io.ErrUnexpectedEOF
  7847. }
  7848. m.Validators = append(m.Validators, ValidatorUpdate{})
  7849. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7850. return err
  7851. }
  7852. iNdEx = postIndex
  7853. case 5:
  7854. if wireType != 2 {
  7855. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7856. }
  7857. var byteLen 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. byteLen |= int(b&0x7F) << shift
  7868. if b < 0x80 {
  7869. break
  7870. }
  7871. }
  7872. if byteLen < 0 {
  7873. return ErrInvalidLengthTypes
  7874. }
  7875. postIndex := iNdEx + byteLen
  7876. if postIndex < 0 {
  7877. return ErrInvalidLengthTypes
  7878. }
  7879. if postIndex > l {
  7880. return io.ErrUnexpectedEOF
  7881. }
  7882. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7883. if m.AppStateBytes == nil {
  7884. m.AppStateBytes = []byte{}
  7885. }
  7886. iNdEx = postIndex
  7887. case 6:
  7888. if wireType != 0 {
  7889. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7890. }
  7891. m.InitialHeight = 0
  7892. for shift := uint(0); ; shift += 7 {
  7893. if shift >= 64 {
  7894. return ErrIntOverflowTypes
  7895. }
  7896. if iNdEx >= l {
  7897. return io.ErrUnexpectedEOF
  7898. }
  7899. b := dAtA[iNdEx]
  7900. iNdEx++
  7901. m.InitialHeight |= int64(b&0x7F) << shift
  7902. if b < 0x80 {
  7903. break
  7904. }
  7905. }
  7906. default:
  7907. iNdEx = preIndex
  7908. skippy, err := skipTypes(dAtA[iNdEx:])
  7909. if err != nil {
  7910. return err
  7911. }
  7912. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7913. return ErrInvalidLengthTypes
  7914. }
  7915. if (iNdEx + skippy) > l {
  7916. return io.ErrUnexpectedEOF
  7917. }
  7918. iNdEx += skippy
  7919. }
  7920. }
  7921. if iNdEx > l {
  7922. return io.ErrUnexpectedEOF
  7923. }
  7924. return nil
  7925. }
  7926. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7927. l := len(dAtA)
  7928. iNdEx := 0
  7929. for iNdEx < l {
  7930. preIndex := iNdEx
  7931. var wire uint64
  7932. for shift := uint(0); ; shift += 7 {
  7933. if shift >= 64 {
  7934. return ErrIntOverflowTypes
  7935. }
  7936. if iNdEx >= l {
  7937. return io.ErrUnexpectedEOF
  7938. }
  7939. b := dAtA[iNdEx]
  7940. iNdEx++
  7941. wire |= uint64(b&0x7F) << shift
  7942. if b < 0x80 {
  7943. break
  7944. }
  7945. }
  7946. fieldNum := int32(wire >> 3)
  7947. wireType := int(wire & 0x7)
  7948. if wireType == 4 {
  7949. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7950. }
  7951. if fieldNum <= 0 {
  7952. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7953. }
  7954. switch fieldNum {
  7955. case 1:
  7956. if wireType != 2 {
  7957. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7958. }
  7959. var byteLen int
  7960. for shift := uint(0); ; shift += 7 {
  7961. if shift >= 64 {
  7962. return ErrIntOverflowTypes
  7963. }
  7964. if iNdEx >= l {
  7965. return io.ErrUnexpectedEOF
  7966. }
  7967. b := dAtA[iNdEx]
  7968. iNdEx++
  7969. byteLen |= int(b&0x7F) << shift
  7970. if b < 0x80 {
  7971. break
  7972. }
  7973. }
  7974. if byteLen < 0 {
  7975. return ErrInvalidLengthTypes
  7976. }
  7977. postIndex := iNdEx + byteLen
  7978. if postIndex < 0 {
  7979. return ErrInvalidLengthTypes
  7980. }
  7981. if postIndex > l {
  7982. return io.ErrUnexpectedEOF
  7983. }
  7984. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  7985. if m.Data == nil {
  7986. m.Data = []byte{}
  7987. }
  7988. iNdEx = postIndex
  7989. case 2:
  7990. if wireType != 2 {
  7991. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  7992. }
  7993. var stringLen uint64
  7994. for shift := uint(0); ; shift += 7 {
  7995. if shift >= 64 {
  7996. return ErrIntOverflowTypes
  7997. }
  7998. if iNdEx >= l {
  7999. return io.ErrUnexpectedEOF
  8000. }
  8001. b := dAtA[iNdEx]
  8002. iNdEx++
  8003. stringLen |= uint64(b&0x7F) << shift
  8004. if b < 0x80 {
  8005. break
  8006. }
  8007. }
  8008. intStringLen := int(stringLen)
  8009. if intStringLen < 0 {
  8010. return ErrInvalidLengthTypes
  8011. }
  8012. postIndex := iNdEx + intStringLen
  8013. if postIndex < 0 {
  8014. return ErrInvalidLengthTypes
  8015. }
  8016. if postIndex > l {
  8017. return io.ErrUnexpectedEOF
  8018. }
  8019. m.Path = string(dAtA[iNdEx:postIndex])
  8020. iNdEx = postIndex
  8021. case 3:
  8022. if wireType != 0 {
  8023. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8024. }
  8025. m.Height = 0
  8026. for shift := uint(0); ; shift += 7 {
  8027. if shift >= 64 {
  8028. return ErrIntOverflowTypes
  8029. }
  8030. if iNdEx >= l {
  8031. return io.ErrUnexpectedEOF
  8032. }
  8033. b := dAtA[iNdEx]
  8034. iNdEx++
  8035. m.Height |= int64(b&0x7F) << shift
  8036. if b < 0x80 {
  8037. break
  8038. }
  8039. }
  8040. case 4:
  8041. if wireType != 0 {
  8042. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  8043. }
  8044. var v int
  8045. for shift := uint(0); ; shift += 7 {
  8046. if shift >= 64 {
  8047. return ErrIntOverflowTypes
  8048. }
  8049. if iNdEx >= l {
  8050. return io.ErrUnexpectedEOF
  8051. }
  8052. b := dAtA[iNdEx]
  8053. iNdEx++
  8054. v |= int(b&0x7F) << shift
  8055. if b < 0x80 {
  8056. break
  8057. }
  8058. }
  8059. m.Prove = bool(v != 0)
  8060. default:
  8061. iNdEx = preIndex
  8062. skippy, err := skipTypes(dAtA[iNdEx:])
  8063. if err != nil {
  8064. return err
  8065. }
  8066. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8067. return ErrInvalidLengthTypes
  8068. }
  8069. if (iNdEx + skippy) > l {
  8070. return io.ErrUnexpectedEOF
  8071. }
  8072. iNdEx += skippy
  8073. }
  8074. }
  8075. if iNdEx > l {
  8076. return io.ErrUnexpectedEOF
  8077. }
  8078. return nil
  8079. }
  8080. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  8081. l := len(dAtA)
  8082. iNdEx := 0
  8083. for iNdEx < l {
  8084. preIndex := iNdEx
  8085. var wire uint64
  8086. for shift := uint(0); ; shift += 7 {
  8087. if shift >= 64 {
  8088. return ErrIntOverflowTypes
  8089. }
  8090. if iNdEx >= l {
  8091. return io.ErrUnexpectedEOF
  8092. }
  8093. b := dAtA[iNdEx]
  8094. iNdEx++
  8095. wire |= uint64(b&0x7F) << shift
  8096. if b < 0x80 {
  8097. break
  8098. }
  8099. }
  8100. fieldNum := int32(wire >> 3)
  8101. wireType := int(wire & 0x7)
  8102. if wireType == 4 {
  8103. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  8104. }
  8105. if fieldNum <= 0 {
  8106. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8107. }
  8108. switch fieldNum {
  8109. case 1:
  8110. if wireType != 2 {
  8111. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  8112. }
  8113. var byteLen int
  8114. for shift := uint(0); ; shift += 7 {
  8115. if shift >= 64 {
  8116. return ErrIntOverflowTypes
  8117. }
  8118. if iNdEx >= l {
  8119. return io.ErrUnexpectedEOF
  8120. }
  8121. b := dAtA[iNdEx]
  8122. iNdEx++
  8123. byteLen |= int(b&0x7F) << shift
  8124. if b < 0x80 {
  8125. break
  8126. }
  8127. }
  8128. if byteLen < 0 {
  8129. return ErrInvalidLengthTypes
  8130. }
  8131. postIndex := iNdEx + byteLen
  8132. if postIndex < 0 {
  8133. return ErrInvalidLengthTypes
  8134. }
  8135. if postIndex > l {
  8136. return io.ErrUnexpectedEOF
  8137. }
  8138. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  8139. if m.Hash == nil {
  8140. m.Hash = []byte{}
  8141. }
  8142. iNdEx = postIndex
  8143. case 2:
  8144. if wireType != 2 {
  8145. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8146. }
  8147. var msglen int
  8148. for shift := uint(0); ; shift += 7 {
  8149. if shift >= 64 {
  8150. return ErrIntOverflowTypes
  8151. }
  8152. if iNdEx >= l {
  8153. return io.ErrUnexpectedEOF
  8154. }
  8155. b := dAtA[iNdEx]
  8156. iNdEx++
  8157. msglen |= int(b&0x7F) << shift
  8158. if b < 0x80 {
  8159. break
  8160. }
  8161. }
  8162. if msglen < 0 {
  8163. return ErrInvalidLengthTypes
  8164. }
  8165. postIndex := iNdEx + msglen
  8166. if postIndex < 0 {
  8167. return ErrInvalidLengthTypes
  8168. }
  8169. if postIndex > l {
  8170. return io.ErrUnexpectedEOF
  8171. }
  8172. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8173. return err
  8174. }
  8175. iNdEx = postIndex
  8176. case 3:
  8177. if wireType != 2 {
  8178. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  8179. }
  8180. var msglen int
  8181. for shift := uint(0); ; shift += 7 {
  8182. if shift >= 64 {
  8183. return ErrIntOverflowTypes
  8184. }
  8185. if iNdEx >= l {
  8186. return io.ErrUnexpectedEOF
  8187. }
  8188. b := dAtA[iNdEx]
  8189. iNdEx++
  8190. msglen |= int(b&0x7F) << shift
  8191. if b < 0x80 {
  8192. break
  8193. }
  8194. }
  8195. if msglen < 0 {
  8196. return ErrInvalidLengthTypes
  8197. }
  8198. postIndex := iNdEx + msglen
  8199. if postIndex < 0 {
  8200. return ErrInvalidLengthTypes
  8201. }
  8202. if postIndex > l {
  8203. return io.ErrUnexpectedEOF
  8204. }
  8205. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8206. return err
  8207. }
  8208. iNdEx = postIndex
  8209. case 4:
  8210. if wireType != 2 {
  8211. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8212. }
  8213. var msglen int
  8214. for shift := uint(0); ; shift += 7 {
  8215. if shift >= 64 {
  8216. return ErrIntOverflowTypes
  8217. }
  8218. if iNdEx >= l {
  8219. return io.ErrUnexpectedEOF
  8220. }
  8221. b := dAtA[iNdEx]
  8222. iNdEx++
  8223. msglen |= int(b&0x7F) << shift
  8224. if b < 0x80 {
  8225. break
  8226. }
  8227. }
  8228. if msglen < 0 {
  8229. return ErrInvalidLengthTypes
  8230. }
  8231. postIndex := iNdEx + msglen
  8232. if postIndex < 0 {
  8233. return ErrInvalidLengthTypes
  8234. }
  8235. if postIndex > l {
  8236. return io.ErrUnexpectedEOF
  8237. }
  8238. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8239. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8240. return err
  8241. }
  8242. iNdEx = postIndex
  8243. default:
  8244. iNdEx = preIndex
  8245. skippy, err := skipTypes(dAtA[iNdEx:])
  8246. if err != nil {
  8247. return err
  8248. }
  8249. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8250. return ErrInvalidLengthTypes
  8251. }
  8252. if (iNdEx + skippy) > l {
  8253. return io.ErrUnexpectedEOF
  8254. }
  8255. iNdEx += skippy
  8256. }
  8257. }
  8258. if iNdEx > l {
  8259. return io.ErrUnexpectedEOF
  8260. }
  8261. return nil
  8262. }
  8263. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8264. l := len(dAtA)
  8265. iNdEx := 0
  8266. for iNdEx < l {
  8267. preIndex := iNdEx
  8268. var wire uint64
  8269. for shift := uint(0); ; shift += 7 {
  8270. if shift >= 64 {
  8271. return ErrIntOverflowTypes
  8272. }
  8273. if iNdEx >= l {
  8274. return io.ErrUnexpectedEOF
  8275. }
  8276. b := dAtA[iNdEx]
  8277. iNdEx++
  8278. wire |= uint64(b&0x7F) << shift
  8279. if b < 0x80 {
  8280. break
  8281. }
  8282. }
  8283. fieldNum := int32(wire >> 3)
  8284. wireType := int(wire & 0x7)
  8285. if wireType == 4 {
  8286. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8287. }
  8288. if fieldNum <= 0 {
  8289. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8290. }
  8291. switch fieldNum {
  8292. case 1:
  8293. if wireType != 2 {
  8294. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8295. }
  8296. var byteLen int
  8297. for shift := uint(0); ; shift += 7 {
  8298. if shift >= 64 {
  8299. return ErrIntOverflowTypes
  8300. }
  8301. if iNdEx >= l {
  8302. return io.ErrUnexpectedEOF
  8303. }
  8304. b := dAtA[iNdEx]
  8305. iNdEx++
  8306. byteLen |= int(b&0x7F) << shift
  8307. if b < 0x80 {
  8308. break
  8309. }
  8310. }
  8311. if byteLen < 0 {
  8312. return ErrInvalidLengthTypes
  8313. }
  8314. postIndex := iNdEx + byteLen
  8315. if postIndex < 0 {
  8316. return ErrInvalidLengthTypes
  8317. }
  8318. if postIndex > l {
  8319. return io.ErrUnexpectedEOF
  8320. }
  8321. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8322. if m.Tx == nil {
  8323. m.Tx = []byte{}
  8324. }
  8325. iNdEx = postIndex
  8326. case 2:
  8327. if wireType != 0 {
  8328. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8329. }
  8330. m.Type = 0
  8331. for shift := uint(0); ; shift += 7 {
  8332. if shift >= 64 {
  8333. return ErrIntOverflowTypes
  8334. }
  8335. if iNdEx >= l {
  8336. return io.ErrUnexpectedEOF
  8337. }
  8338. b := dAtA[iNdEx]
  8339. iNdEx++
  8340. m.Type |= CheckTxType(b&0x7F) << shift
  8341. if b < 0x80 {
  8342. break
  8343. }
  8344. }
  8345. default:
  8346. iNdEx = preIndex
  8347. skippy, err := skipTypes(dAtA[iNdEx:])
  8348. if err != nil {
  8349. return err
  8350. }
  8351. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8352. return ErrInvalidLengthTypes
  8353. }
  8354. if (iNdEx + skippy) > l {
  8355. return io.ErrUnexpectedEOF
  8356. }
  8357. iNdEx += skippy
  8358. }
  8359. }
  8360. if iNdEx > l {
  8361. return io.ErrUnexpectedEOF
  8362. }
  8363. return nil
  8364. }
  8365. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8366. l := len(dAtA)
  8367. iNdEx := 0
  8368. for iNdEx < l {
  8369. preIndex := iNdEx
  8370. var wire uint64
  8371. for shift := uint(0); ; shift += 7 {
  8372. if shift >= 64 {
  8373. return ErrIntOverflowTypes
  8374. }
  8375. if iNdEx >= l {
  8376. return io.ErrUnexpectedEOF
  8377. }
  8378. b := dAtA[iNdEx]
  8379. iNdEx++
  8380. wire |= uint64(b&0x7F) << shift
  8381. if b < 0x80 {
  8382. break
  8383. }
  8384. }
  8385. fieldNum := int32(wire >> 3)
  8386. wireType := int(wire & 0x7)
  8387. if wireType == 4 {
  8388. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8389. }
  8390. if fieldNum <= 0 {
  8391. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8392. }
  8393. switch fieldNum {
  8394. case 1:
  8395. if wireType != 2 {
  8396. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8397. }
  8398. var byteLen int
  8399. for shift := uint(0); ; shift += 7 {
  8400. if shift >= 64 {
  8401. return ErrIntOverflowTypes
  8402. }
  8403. if iNdEx >= l {
  8404. return io.ErrUnexpectedEOF
  8405. }
  8406. b := dAtA[iNdEx]
  8407. iNdEx++
  8408. byteLen |= int(b&0x7F) << shift
  8409. if b < 0x80 {
  8410. break
  8411. }
  8412. }
  8413. if byteLen < 0 {
  8414. return ErrInvalidLengthTypes
  8415. }
  8416. postIndex := iNdEx + byteLen
  8417. if postIndex < 0 {
  8418. return ErrInvalidLengthTypes
  8419. }
  8420. if postIndex > l {
  8421. return io.ErrUnexpectedEOF
  8422. }
  8423. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8424. if m.Tx == nil {
  8425. m.Tx = []byte{}
  8426. }
  8427. iNdEx = postIndex
  8428. default:
  8429. iNdEx = preIndex
  8430. skippy, err := skipTypes(dAtA[iNdEx:])
  8431. if err != nil {
  8432. return err
  8433. }
  8434. if (skippy < 0) || (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 *RequestEndBlock) 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: RequestEndBlock: wiretype end group for non-group")
  8472. }
  8473. if fieldNum <= 0 {
  8474. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8475. }
  8476. switch fieldNum {
  8477. case 1:
  8478. if wireType != 0 {
  8479. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8480. }
  8481. m.Height = 0
  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. m.Height |= int64(b&0x7F) << shift
  8492. if b < 0x80 {
  8493. break
  8494. }
  8495. }
  8496. default:
  8497. iNdEx = preIndex
  8498. skippy, err := skipTypes(dAtA[iNdEx:])
  8499. if err != nil {
  8500. return err
  8501. }
  8502. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8503. return ErrInvalidLengthTypes
  8504. }
  8505. if (iNdEx + skippy) > l {
  8506. return io.ErrUnexpectedEOF
  8507. }
  8508. iNdEx += skippy
  8509. }
  8510. }
  8511. if iNdEx > l {
  8512. return io.ErrUnexpectedEOF
  8513. }
  8514. return nil
  8515. }
  8516. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8517. l := len(dAtA)
  8518. iNdEx := 0
  8519. for iNdEx < l {
  8520. preIndex := iNdEx
  8521. var wire uint64
  8522. for shift := uint(0); ; shift += 7 {
  8523. if shift >= 64 {
  8524. return ErrIntOverflowTypes
  8525. }
  8526. if iNdEx >= l {
  8527. return io.ErrUnexpectedEOF
  8528. }
  8529. b := dAtA[iNdEx]
  8530. iNdEx++
  8531. wire |= uint64(b&0x7F) << shift
  8532. if b < 0x80 {
  8533. break
  8534. }
  8535. }
  8536. fieldNum := int32(wire >> 3)
  8537. wireType := int(wire & 0x7)
  8538. if wireType == 4 {
  8539. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8540. }
  8541. if fieldNum <= 0 {
  8542. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8543. }
  8544. switch fieldNum {
  8545. default:
  8546. iNdEx = preIndex
  8547. skippy, err := skipTypes(dAtA[iNdEx:])
  8548. if err != nil {
  8549. return err
  8550. }
  8551. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8552. return ErrInvalidLengthTypes
  8553. }
  8554. if (iNdEx + skippy) > l {
  8555. return io.ErrUnexpectedEOF
  8556. }
  8557. iNdEx += skippy
  8558. }
  8559. }
  8560. if iNdEx > l {
  8561. return io.ErrUnexpectedEOF
  8562. }
  8563. return nil
  8564. }
  8565. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  8566. l := len(dAtA)
  8567. iNdEx := 0
  8568. for iNdEx < l {
  8569. preIndex := iNdEx
  8570. var wire uint64
  8571. for shift := uint(0); ; shift += 7 {
  8572. if shift >= 64 {
  8573. return ErrIntOverflowTypes
  8574. }
  8575. if iNdEx >= l {
  8576. return io.ErrUnexpectedEOF
  8577. }
  8578. b := dAtA[iNdEx]
  8579. iNdEx++
  8580. wire |= uint64(b&0x7F) << shift
  8581. if b < 0x80 {
  8582. break
  8583. }
  8584. }
  8585. fieldNum := int32(wire >> 3)
  8586. wireType := int(wire & 0x7)
  8587. if wireType == 4 {
  8588. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  8589. }
  8590. if fieldNum <= 0 {
  8591. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  8592. }
  8593. switch fieldNum {
  8594. default:
  8595. iNdEx = preIndex
  8596. skippy, err := skipTypes(dAtA[iNdEx:])
  8597. if err != nil {
  8598. return err
  8599. }
  8600. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8601. return ErrInvalidLengthTypes
  8602. }
  8603. if (iNdEx + skippy) > l {
  8604. return io.ErrUnexpectedEOF
  8605. }
  8606. iNdEx += skippy
  8607. }
  8608. }
  8609. if iNdEx > l {
  8610. return io.ErrUnexpectedEOF
  8611. }
  8612. return nil
  8613. }
  8614. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  8615. l := len(dAtA)
  8616. iNdEx := 0
  8617. for iNdEx < l {
  8618. preIndex := iNdEx
  8619. var wire uint64
  8620. for shift := uint(0); ; shift += 7 {
  8621. if shift >= 64 {
  8622. return ErrIntOverflowTypes
  8623. }
  8624. if iNdEx >= l {
  8625. return io.ErrUnexpectedEOF
  8626. }
  8627. b := dAtA[iNdEx]
  8628. iNdEx++
  8629. wire |= uint64(b&0x7F) << shift
  8630. if b < 0x80 {
  8631. break
  8632. }
  8633. }
  8634. fieldNum := int32(wire >> 3)
  8635. wireType := int(wire & 0x7)
  8636. if wireType == 4 {
  8637. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  8638. }
  8639. if fieldNum <= 0 {
  8640. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8641. }
  8642. switch fieldNum {
  8643. case 1:
  8644. if wireType != 2 {
  8645. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8646. }
  8647. var msglen int
  8648. for shift := uint(0); ; shift += 7 {
  8649. if shift >= 64 {
  8650. return ErrIntOverflowTypes
  8651. }
  8652. if iNdEx >= l {
  8653. return io.ErrUnexpectedEOF
  8654. }
  8655. b := dAtA[iNdEx]
  8656. iNdEx++
  8657. msglen |= int(b&0x7F) << shift
  8658. if b < 0x80 {
  8659. break
  8660. }
  8661. }
  8662. if msglen < 0 {
  8663. return ErrInvalidLengthTypes
  8664. }
  8665. postIndex := iNdEx + msglen
  8666. if postIndex < 0 {
  8667. return ErrInvalidLengthTypes
  8668. }
  8669. if postIndex > l {
  8670. return io.ErrUnexpectedEOF
  8671. }
  8672. if m.Snapshot == nil {
  8673. m.Snapshot = &Snapshot{}
  8674. }
  8675. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8676. return err
  8677. }
  8678. iNdEx = postIndex
  8679. case 2:
  8680. if wireType != 2 {
  8681. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8682. }
  8683. var byteLen int
  8684. for shift := uint(0); ; shift += 7 {
  8685. if shift >= 64 {
  8686. return ErrIntOverflowTypes
  8687. }
  8688. if iNdEx >= l {
  8689. return io.ErrUnexpectedEOF
  8690. }
  8691. b := dAtA[iNdEx]
  8692. iNdEx++
  8693. byteLen |= int(b&0x7F) << shift
  8694. if b < 0x80 {
  8695. break
  8696. }
  8697. }
  8698. if byteLen < 0 {
  8699. return ErrInvalidLengthTypes
  8700. }
  8701. postIndex := iNdEx + byteLen
  8702. if postIndex < 0 {
  8703. return ErrInvalidLengthTypes
  8704. }
  8705. if postIndex > l {
  8706. return io.ErrUnexpectedEOF
  8707. }
  8708. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8709. if m.AppHash == nil {
  8710. m.AppHash = []byte{}
  8711. }
  8712. iNdEx = postIndex
  8713. default:
  8714. iNdEx = preIndex
  8715. skippy, err := skipTypes(dAtA[iNdEx:])
  8716. if err != nil {
  8717. return err
  8718. }
  8719. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8720. return ErrInvalidLengthTypes
  8721. }
  8722. if (iNdEx + skippy) > l {
  8723. return io.ErrUnexpectedEOF
  8724. }
  8725. iNdEx += skippy
  8726. }
  8727. }
  8728. if iNdEx > l {
  8729. return io.ErrUnexpectedEOF
  8730. }
  8731. return nil
  8732. }
  8733. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8734. l := len(dAtA)
  8735. iNdEx := 0
  8736. for iNdEx < l {
  8737. preIndex := iNdEx
  8738. var wire uint64
  8739. for shift := uint(0); ; shift += 7 {
  8740. if shift >= 64 {
  8741. return ErrIntOverflowTypes
  8742. }
  8743. if iNdEx >= l {
  8744. return io.ErrUnexpectedEOF
  8745. }
  8746. b := dAtA[iNdEx]
  8747. iNdEx++
  8748. wire |= uint64(b&0x7F) << shift
  8749. if b < 0x80 {
  8750. break
  8751. }
  8752. }
  8753. fieldNum := int32(wire >> 3)
  8754. wireType := int(wire & 0x7)
  8755. if wireType == 4 {
  8756. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8757. }
  8758. if fieldNum <= 0 {
  8759. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8760. }
  8761. switch fieldNum {
  8762. case 1:
  8763. if wireType != 0 {
  8764. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8765. }
  8766. m.Height = 0
  8767. for shift := uint(0); ; shift += 7 {
  8768. if shift >= 64 {
  8769. return ErrIntOverflowTypes
  8770. }
  8771. if iNdEx >= l {
  8772. return io.ErrUnexpectedEOF
  8773. }
  8774. b := dAtA[iNdEx]
  8775. iNdEx++
  8776. m.Height |= uint64(b&0x7F) << shift
  8777. if b < 0x80 {
  8778. break
  8779. }
  8780. }
  8781. case 2:
  8782. if wireType != 0 {
  8783. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8784. }
  8785. m.Format = 0
  8786. for shift := uint(0); ; shift += 7 {
  8787. if shift >= 64 {
  8788. return ErrIntOverflowTypes
  8789. }
  8790. if iNdEx >= l {
  8791. return io.ErrUnexpectedEOF
  8792. }
  8793. b := dAtA[iNdEx]
  8794. iNdEx++
  8795. m.Format |= uint32(b&0x7F) << shift
  8796. if b < 0x80 {
  8797. break
  8798. }
  8799. }
  8800. case 3:
  8801. if wireType != 0 {
  8802. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8803. }
  8804. m.Chunk = 0
  8805. for shift := uint(0); ; shift += 7 {
  8806. if shift >= 64 {
  8807. return ErrIntOverflowTypes
  8808. }
  8809. if iNdEx >= l {
  8810. return io.ErrUnexpectedEOF
  8811. }
  8812. b := dAtA[iNdEx]
  8813. iNdEx++
  8814. m.Chunk |= uint32(b&0x7F) << shift
  8815. if b < 0x80 {
  8816. break
  8817. }
  8818. }
  8819. default:
  8820. iNdEx = preIndex
  8821. skippy, err := skipTypes(dAtA[iNdEx:])
  8822. if err != nil {
  8823. return err
  8824. }
  8825. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8826. return ErrInvalidLengthTypes
  8827. }
  8828. if (iNdEx + skippy) > l {
  8829. return io.ErrUnexpectedEOF
  8830. }
  8831. iNdEx += skippy
  8832. }
  8833. }
  8834. if iNdEx > l {
  8835. return io.ErrUnexpectedEOF
  8836. }
  8837. return nil
  8838. }
  8839. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8840. l := len(dAtA)
  8841. iNdEx := 0
  8842. for iNdEx < l {
  8843. preIndex := iNdEx
  8844. var wire uint64
  8845. for shift := uint(0); ; shift += 7 {
  8846. if shift >= 64 {
  8847. return ErrIntOverflowTypes
  8848. }
  8849. if iNdEx >= l {
  8850. return io.ErrUnexpectedEOF
  8851. }
  8852. b := dAtA[iNdEx]
  8853. iNdEx++
  8854. wire |= uint64(b&0x7F) << shift
  8855. if b < 0x80 {
  8856. break
  8857. }
  8858. }
  8859. fieldNum := int32(wire >> 3)
  8860. wireType := int(wire & 0x7)
  8861. if wireType == 4 {
  8862. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8863. }
  8864. if fieldNum <= 0 {
  8865. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8866. }
  8867. switch fieldNum {
  8868. case 1:
  8869. if wireType != 0 {
  8870. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8871. }
  8872. m.Index = 0
  8873. for shift := uint(0); ; shift += 7 {
  8874. if shift >= 64 {
  8875. return ErrIntOverflowTypes
  8876. }
  8877. if iNdEx >= l {
  8878. return io.ErrUnexpectedEOF
  8879. }
  8880. b := dAtA[iNdEx]
  8881. iNdEx++
  8882. m.Index |= uint32(b&0x7F) << shift
  8883. if b < 0x80 {
  8884. break
  8885. }
  8886. }
  8887. case 2:
  8888. if wireType != 2 {
  8889. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8890. }
  8891. var byteLen int
  8892. for shift := uint(0); ; shift += 7 {
  8893. if shift >= 64 {
  8894. return ErrIntOverflowTypes
  8895. }
  8896. if iNdEx >= l {
  8897. return io.ErrUnexpectedEOF
  8898. }
  8899. b := dAtA[iNdEx]
  8900. iNdEx++
  8901. byteLen |= int(b&0x7F) << shift
  8902. if b < 0x80 {
  8903. break
  8904. }
  8905. }
  8906. if byteLen < 0 {
  8907. return ErrInvalidLengthTypes
  8908. }
  8909. postIndex := iNdEx + byteLen
  8910. if postIndex < 0 {
  8911. return ErrInvalidLengthTypes
  8912. }
  8913. if postIndex > l {
  8914. return io.ErrUnexpectedEOF
  8915. }
  8916. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8917. if m.Chunk == nil {
  8918. m.Chunk = []byte{}
  8919. }
  8920. iNdEx = postIndex
  8921. case 3:
  8922. if wireType != 2 {
  8923. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8924. }
  8925. var stringLen uint64
  8926. for shift := uint(0); ; shift += 7 {
  8927. if shift >= 64 {
  8928. return ErrIntOverflowTypes
  8929. }
  8930. if iNdEx >= l {
  8931. return io.ErrUnexpectedEOF
  8932. }
  8933. b := dAtA[iNdEx]
  8934. iNdEx++
  8935. stringLen |= uint64(b&0x7F) << shift
  8936. if b < 0x80 {
  8937. break
  8938. }
  8939. }
  8940. intStringLen := int(stringLen)
  8941. if intStringLen < 0 {
  8942. return ErrInvalidLengthTypes
  8943. }
  8944. postIndex := iNdEx + intStringLen
  8945. if postIndex < 0 {
  8946. return ErrInvalidLengthTypes
  8947. }
  8948. if postIndex > l {
  8949. return io.ErrUnexpectedEOF
  8950. }
  8951. m.Sender = string(dAtA[iNdEx:postIndex])
  8952. iNdEx = postIndex
  8953. default:
  8954. iNdEx = preIndex
  8955. skippy, err := skipTypes(dAtA[iNdEx:])
  8956. if err != nil {
  8957. return err
  8958. }
  8959. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8960. return ErrInvalidLengthTypes
  8961. }
  8962. if (iNdEx + skippy) > l {
  8963. return io.ErrUnexpectedEOF
  8964. }
  8965. iNdEx += skippy
  8966. }
  8967. }
  8968. if iNdEx > l {
  8969. return io.ErrUnexpectedEOF
  8970. }
  8971. return nil
  8972. }
  8973. func (m *Response) Unmarshal(dAtA []byte) error {
  8974. l := len(dAtA)
  8975. iNdEx := 0
  8976. for iNdEx < l {
  8977. preIndex := iNdEx
  8978. var wire uint64
  8979. for shift := uint(0); ; shift += 7 {
  8980. if shift >= 64 {
  8981. return ErrIntOverflowTypes
  8982. }
  8983. if iNdEx >= l {
  8984. return io.ErrUnexpectedEOF
  8985. }
  8986. b := dAtA[iNdEx]
  8987. iNdEx++
  8988. wire |= uint64(b&0x7F) << shift
  8989. if b < 0x80 {
  8990. break
  8991. }
  8992. }
  8993. fieldNum := int32(wire >> 3)
  8994. wireType := int(wire & 0x7)
  8995. if wireType == 4 {
  8996. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  8997. }
  8998. if fieldNum <= 0 {
  8999. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  9000. }
  9001. switch fieldNum {
  9002. case 1:
  9003. if wireType != 2 {
  9004. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  9005. }
  9006. var msglen int
  9007. for shift := uint(0); ; shift += 7 {
  9008. if shift >= 64 {
  9009. return ErrIntOverflowTypes
  9010. }
  9011. if iNdEx >= l {
  9012. return io.ErrUnexpectedEOF
  9013. }
  9014. b := dAtA[iNdEx]
  9015. iNdEx++
  9016. msglen |= int(b&0x7F) << shift
  9017. if b < 0x80 {
  9018. break
  9019. }
  9020. }
  9021. if msglen < 0 {
  9022. return ErrInvalidLengthTypes
  9023. }
  9024. postIndex := iNdEx + msglen
  9025. if postIndex < 0 {
  9026. return ErrInvalidLengthTypes
  9027. }
  9028. if postIndex > l {
  9029. return io.ErrUnexpectedEOF
  9030. }
  9031. v := &ResponseException{}
  9032. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9033. return err
  9034. }
  9035. m.Value = &Response_Exception{v}
  9036. iNdEx = postIndex
  9037. case 2:
  9038. if wireType != 2 {
  9039. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  9040. }
  9041. var msglen int
  9042. for shift := uint(0); ; shift += 7 {
  9043. if shift >= 64 {
  9044. return ErrIntOverflowTypes
  9045. }
  9046. if iNdEx >= l {
  9047. return io.ErrUnexpectedEOF
  9048. }
  9049. b := dAtA[iNdEx]
  9050. iNdEx++
  9051. msglen |= int(b&0x7F) << shift
  9052. if b < 0x80 {
  9053. break
  9054. }
  9055. }
  9056. if msglen < 0 {
  9057. return ErrInvalidLengthTypes
  9058. }
  9059. postIndex := iNdEx + msglen
  9060. if postIndex < 0 {
  9061. return ErrInvalidLengthTypes
  9062. }
  9063. if postIndex > l {
  9064. return io.ErrUnexpectedEOF
  9065. }
  9066. v := &ResponseEcho{}
  9067. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9068. return err
  9069. }
  9070. m.Value = &Response_Echo{v}
  9071. iNdEx = postIndex
  9072. case 3:
  9073. if wireType != 2 {
  9074. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  9075. }
  9076. var msglen int
  9077. for shift := uint(0); ; shift += 7 {
  9078. if shift >= 64 {
  9079. return ErrIntOverflowTypes
  9080. }
  9081. if iNdEx >= l {
  9082. return io.ErrUnexpectedEOF
  9083. }
  9084. b := dAtA[iNdEx]
  9085. iNdEx++
  9086. msglen |= int(b&0x7F) << shift
  9087. if b < 0x80 {
  9088. break
  9089. }
  9090. }
  9091. if msglen < 0 {
  9092. return ErrInvalidLengthTypes
  9093. }
  9094. postIndex := iNdEx + msglen
  9095. if postIndex < 0 {
  9096. return ErrInvalidLengthTypes
  9097. }
  9098. if postIndex > l {
  9099. return io.ErrUnexpectedEOF
  9100. }
  9101. v := &ResponseFlush{}
  9102. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9103. return err
  9104. }
  9105. m.Value = &Response_Flush{v}
  9106. iNdEx = postIndex
  9107. case 4:
  9108. if wireType != 2 {
  9109. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9110. }
  9111. var msglen int
  9112. for shift := uint(0); ; shift += 7 {
  9113. if shift >= 64 {
  9114. return ErrIntOverflowTypes
  9115. }
  9116. if iNdEx >= l {
  9117. return io.ErrUnexpectedEOF
  9118. }
  9119. b := dAtA[iNdEx]
  9120. iNdEx++
  9121. msglen |= int(b&0x7F) << shift
  9122. if b < 0x80 {
  9123. break
  9124. }
  9125. }
  9126. if msglen < 0 {
  9127. return ErrInvalidLengthTypes
  9128. }
  9129. postIndex := iNdEx + msglen
  9130. if postIndex < 0 {
  9131. return ErrInvalidLengthTypes
  9132. }
  9133. if postIndex > l {
  9134. return io.ErrUnexpectedEOF
  9135. }
  9136. v := &ResponseInfo{}
  9137. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9138. return err
  9139. }
  9140. m.Value = &Response_Info{v}
  9141. iNdEx = postIndex
  9142. case 5:
  9143. if wireType != 2 {
  9144. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  9145. }
  9146. var msglen int
  9147. for shift := uint(0); ; shift += 7 {
  9148. if shift >= 64 {
  9149. return ErrIntOverflowTypes
  9150. }
  9151. if iNdEx >= l {
  9152. return io.ErrUnexpectedEOF
  9153. }
  9154. b := dAtA[iNdEx]
  9155. iNdEx++
  9156. msglen |= int(b&0x7F) << shift
  9157. if b < 0x80 {
  9158. break
  9159. }
  9160. }
  9161. if msglen < 0 {
  9162. return ErrInvalidLengthTypes
  9163. }
  9164. postIndex := iNdEx + msglen
  9165. if postIndex < 0 {
  9166. return ErrInvalidLengthTypes
  9167. }
  9168. if postIndex > l {
  9169. return io.ErrUnexpectedEOF
  9170. }
  9171. v := &ResponseInitChain{}
  9172. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9173. return err
  9174. }
  9175. m.Value = &Response_InitChain{v}
  9176. iNdEx = postIndex
  9177. case 6:
  9178. if wireType != 2 {
  9179. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  9180. }
  9181. var msglen int
  9182. for shift := uint(0); ; shift += 7 {
  9183. if shift >= 64 {
  9184. return ErrIntOverflowTypes
  9185. }
  9186. if iNdEx >= l {
  9187. return io.ErrUnexpectedEOF
  9188. }
  9189. b := dAtA[iNdEx]
  9190. iNdEx++
  9191. msglen |= int(b&0x7F) << shift
  9192. if b < 0x80 {
  9193. break
  9194. }
  9195. }
  9196. if msglen < 0 {
  9197. return ErrInvalidLengthTypes
  9198. }
  9199. postIndex := iNdEx + msglen
  9200. if postIndex < 0 {
  9201. return ErrInvalidLengthTypes
  9202. }
  9203. if postIndex > l {
  9204. return io.ErrUnexpectedEOF
  9205. }
  9206. v := &ResponseQuery{}
  9207. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9208. return err
  9209. }
  9210. m.Value = &Response_Query{v}
  9211. iNdEx = postIndex
  9212. case 7:
  9213. if wireType != 2 {
  9214. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9215. }
  9216. var msglen int
  9217. for shift := uint(0); ; shift += 7 {
  9218. if shift >= 64 {
  9219. return ErrIntOverflowTypes
  9220. }
  9221. if iNdEx >= l {
  9222. return io.ErrUnexpectedEOF
  9223. }
  9224. b := dAtA[iNdEx]
  9225. iNdEx++
  9226. msglen |= int(b&0x7F) << shift
  9227. if b < 0x80 {
  9228. break
  9229. }
  9230. }
  9231. if msglen < 0 {
  9232. return ErrInvalidLengthTypes
  9233. }
  9234. postIndex := iNdEx + msglen
  9235. if postIndex < 0 {
  9236. return ErrInvalidLengthTypes
  9237. }
  9238. if postIndex > l {
  9239. return io.ErrUnexpectedEOF
  9240. }
  9241. v := &ResponseBeginBlock{}
  9242. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9243. return err
  9244. }
  9245. m.Value = &Response_BeginBlock{v}
  9246. iNdEx = postIndex
  9247. case 8:
  9248. if wireType != 2 {
  9249. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9250. }
  9251. var msglen int
  9252. for shift := uint(0); ; shift += 7 {
  9253. if shift >= 64 {
  9254. return ErrIntOverflowTypes
  9255. }
  9256. if iNdEx >= l {
  9257. return io.ErrUnexpectedEOF
  9258. }
  9259. b := dAtA[iNdEx]
  9260. iNdEx++
  9261. msglen |= int(b&0x7F) << shift
  9262. if b < 0x80 {
  9263. break
  9264. }
  9265. }
  9266. if msglen < 0 {
  9267. return ErrInvalidLengthTypes
  9268. }
  9269. postIndex := iNdEx + msglen
  9270. if postIndex < 0 {
  9271. return ErrInvalidLengthTypes
  9272. }
  9273. if postIndex > l {
  9274. return io.ErrUnexpectedEOF
  9275. }
  9276. v := &ResponseCheckTx{}
  9277. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9278. return err
  9279. }
  9280. m.Value = &Response_CheckTx{v}
  9281. iNdEx = postIndex
  9282. case 9:
  9283. if wireType != 2 {
  9284. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9285. }
  9286. var msglen int
  9287. for shift := uint(0); ; shift += 7 {
  9288. if shift >= 64 {
  9289. return ErrIntOverflowTypes
  9290. }
  9291. if iNdEx >= l {
  9292. return io.ErrUnexpectedEOF
  9293. }
  9294. b := dAtA[iNdEx]
  9295. iNdEx++
  9296. msglen |= int(b&0x7F) << shift
  9297. if b < 0x80 {
  9298. break
  9299. }
  9300. }
  9301. if msglen < 0 {
  9302. return ErrInvalidLengthTypes
  9303. }
  9304. postIndex := iNdEx + msglen
  9305. if postIndex < 0 {
  9306. return ErrInvalidLengthTypes
  9307. }
  9308. if postIndex > l {
  9309. return io.ErrUnexpectedEOF
  9310. }
  9311. v := &ResponseDeliverTx{}
  9312. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9313. return err
  9314. }
  9315. m.Value = &Response_DeliverTx{v}
  9316. iNdEx = postIndex
  9317. case 10:
  9318. if wireType != 2 {
  9319. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9320. }
  9321. var msglen int
  9322. for shift := uint(0); ; shift += 7 {
  9323. if shift >= 64 {
  9324. return ErrIntOverflowTypes
  9325. }
  9326. if iNdEx >= l {
  9327. return io.ErrUnexpectedEOF
  9328. }
  9329. b := dAtA[iNdEx]
  9330. iNdEx++
  9331. msglen |= int(b&0x7F) << shift
  9332. if b < 0x80 {
  9333. break
  9334. }
  9335. }
  9336. if msglen < 0 {
  9337. return ErrInvalidLengthTypes
  9338. }
  9339. postIndex := iNdEx + msglen
  9340. if postIndex < 0 {
  9341. return ErrInvalidLengthTypes
  9342. }
  9343. if postIndex > l {
  9344. return io.ErrUnexpectedEOF
  9345. }
  9346. v := &ResponseEndBlock{}
  9347. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9348. return err
  9349. }
  9350. m.Value = &Response_EndBlock{v}
  9351. iNdEx = postIndex
  9352. case 11:
  9353. if wireType != 2 {
  9354. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9355. }
  9356. var msglen int
  9357. for shift := uint(0); ; shift += 7 {
  9358. if shift >= 64 {
  9359. return ErrIntOverflowTypes
  9360. }
  9361. if iNdEx >= l {
  9362. return io.ErrUnexpectedEOF
  9363. }
  9364. b := dAtA[iNdEx]
  9365. iNdEx++
  9366. msglen |= int(b&0x7F) << shift
  9367. if b < 0x80 {
  9368. break
  9369. }
  9370. }
  9371. if msglen < 0 {
  9372. return ErrInvalidLengthTypes
  9373. }
  9374. postIndex := iNdEx + msglen
  9375. if postIndex < 0 {
  9376. return ErrInvalidLengthTypes
  9377. }
  9378. if postIndex > l {
  9379. return io.ErrUnexpectedEOF
  9380. }
  9381. v := &ResponseCommit{}
  9382. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9383. return err
  9384. }
  9385. m.Value = &Response_Commit{v}
  9386. iNdEx = postIndex
  9387. case 12:
  9388. if wireType != 2 {
  9389. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9390. }
  9391. var msglen int
  9392. for shift := uint(0); ; shift += 7 {
  9393. if shift >= 64 {
  9394. return ErrIntOverflowTypes
  9395. }
  9396. if iNdEx >= l {
  9397. return io.ErrUnexpectedEOF
  9398. }
  9399. b := dAtA[iNdEx]
  9400. iNdEx++
  9401. msglen |= int(b&0x7F) << shift
  9402. if b < 0x80 {
  9403. break
  9404. }
  9405. }
  9406. if msglen < 0 {
  9407. return ErrInvalidLengthTypes
  9408. }
  9409. postIndex := iNdEx + msglen
  9410. if postIndex < 0 {
  9411. return ErrInvalidLengthTypes
  9412. }
  9413. if postIndex > l {
  9414. return io.ErrUnexpectedEOF
  9415. }
  9416. v := &ResponseListSnapshots{}
  9417. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9418. return err
  9419. }
  9420. m.Value = &Response_ListSnapshots{v}
  9421. iNdEx = postIndex
  9422. case 13:
  9423. if wireType != 2 {
  9424. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9425. }
  9426. var msglen int
  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. msglen |= int(b&0x7F) << shift
  9437. if b < 0x80 {
  9438. break
  9439. }
  9440. }
  9441. if msglen < 0 {
  9442. return ErrInvalidLengthTypes
  9443. }
  9444. postIndex := iNdEx + msglen
  9445. if postIndex < 0 {
  9446. return ErrInvalidLengthTypes
  9447. }
  9448. if postIndex > l {
  9449. return io.ErrUnexpectedEOF
  9450. }
  9451. v := &ResponseOfferSnapshot{}
  9452. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9453. return err
  9454. }
  9455. m.Value = &Response_OfferSnapshot{v}
  9456. iNdEx = postIndex
  9457. case 14:
  9458. if wireType != 2 {
  9459. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9460. }
  9461. var msglen int
  9462. for shift := uint(0); ; shift += 7 {
  9463. if shift >= 64 {
  9464. return ErrIntOverflowTypes
  9465. }
  9466. if iNdEx >= l {
  9467. return io.ErrUnexpectedEOF
  9468. }
  9469. b := dAtA[iNdEx]
  9470. iNdEx++
  9471. msglen |= int(b&0x7F) << shift
  9472. if b < 0x80 {
  9473. break
  9474. }
  9475. }
  9476. if msglen < 0 {
  9477. return ErrInvalidLengthTypes
  9478. }
  9479. postIndex := iNdEx + msglen
  9480. if postIndex < 0 {
  9481. return ErrInvalidLengthTypes
  9482. }
  9483. if postIndex > l {
  9484. return io.ErrUnexpectedEOF
  9485. }
  9486. v := &ResponseLoadSnapshotChunk{}
  9487. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9488. return err
  9489. }
  9490. m.Value = &Response_LoadSnapshotChunk{v}
  9491. iNdEx = postIndex
  9492. case 15:
  9493. if wireType != 2 {
  9494. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9495. }
  9496. var msglen int
  9497. for shift := uint(0); ; shift += 7 {
  9498. if shift >= 64 {
  9499. return ErrIntOverflowTypes
  9500. }
  9501. if iNdEx >= l {
  9502. return io.ErrUnexpectedEOF
  9503. }
  9504. b := dAtA[iNdEx]
  9505. iNdEx++
  9506. msglen |= int(b&0x7F) << shift
  9507. if b < 0x80 {
  9508. break
  9509. }
  9510. }
  9511. if msglen < 0 {
  9512. return ErrInvalidLengthTypes
  9513. }
  9514. postIndex := iNdEx + msglen
  9515. if postIndex < 0 {
  9516. return ErrInvalidLengthTypes
  9517. }
  9518. if postIndex > l {
  9519. return io.ErrUnexpectedEOF
  9520. }
  9521. v := &ResponseApplySnapshotChunk{}
  9522. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9523. return err
  9524. }
  9525. m.Value = &Response_ApplySnapshotChunk{v}
  9526. iNdEx = postIndex
  9527. default:
  9528. iNdEx = preIndex
  9529. skippy, err := skipTypes(dAtA[iNdEx:])
  9530. if err != nil {
  9531. return err
  9532. }
  9533. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9534. return ErrInvalidLengthTypes
  9535. }
  9536. if (iNdEx + skippy) > l {
  9537. return io.ErrUnexpectedEOF
  9538. }
  9539. iNdEx += skippy
  9540. }
  9541. }
  9542. if iNdEx > l {
  9543. return io.ErrUnexpectedEOF
  9544. }
  9545. return nil
  9546. }
  9547. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9548. l := len(dAtA)
  9549. iNdEx := 0
  9550. for iNdEx < l {
  9551. preIndex := iNdEx
  9552. var wire uint64
  9553. for shift := uint(0); ; shift += 7 {
  9554. if shift >= 64 {
  9555. return ErrIntOverflowTypes
  9556. }
  9557. if iNdEx >= l {
  9558. return io.ErrUnexpectedEOF
  9559. }
  9560. b := dAtA[iNdEx]
  9561. iNdEx++
  9562. wire |= uint64(b&0x7F) << shift
  9563. if b < 0x80 {
  9564. break
  9565. }
  9566. }
  9567. fieldNum := int32(wire >> 3)
  9568. wireType := int(wire & 0x7)
  9569. if wireType == 4 {
  9570. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9571. }
  9572. if fieldNum <= 0 {
  9573. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9574. }
  9575. switch fieldNum {
  9576. case 1:
  9577. if wireType != 2 {
  9578. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9579. }
  9580. var stringLen uint64
  9581. for shift := uint(0); ; shift += 7 {
  9582. if shift >= 64 {
  9583. return ErrIntOverflowTypes
  9584. }
  9585. if iNdEx >= l {
  9586. return io.ErrUnexpectedEOF
  9587. }
  9588. b := dAtA[iNdEx]
  9589. iNdEx++
  9590. stringLen |= uint64(b&0x7F) << shift
  9591. if b < 0x80 {
  9592. break
  9593. }
  9594. }
  9595. intStringLen := int(stringLen)
  9596. if intStringLen < 0 {
  9597. return ErrInvalidLengthTypes
  9598. }
  9599. postIndex := iNdEx + intStringLen
  9600. if postIndex < 0 {
  9601. return ErrInvalidLengthTypes
  9602. }
  9603. if postIndex > l {
  9604. return io.ErrUnexpectedEOF
  9605. }
  9606. m.Error = string(dAtA[iNdEx:postIndex])
  9607. iNdEx = postIndex
  9608. default:
  9609. iNdEx = preIndex
  9610. skippy, err := skipTypes(dAtA[iNdEx:])
  9611. if err != nil {
  9612. return err
  9613. }
  9614. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9615. return ErrInvalidLengthTypes
  9616. }
  9617. if (iNdEx + skippy) > l {
  9618. return io.ErrUnexpectedEOF
  9619. }
  9620. iNdEx += skippy
  9621. }
  9622. }
  9623. if iNdEx > l {
  9624. return io.ErrUnexpectedEOF
  9625. }
  9626. return nil
  9627. }
  9628. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9629. l := len(dAtA)
  9630. iNdEx := 0
  9631. for iNdEx < l {
  9632. preIndex := iNdEx
  9633. var wire uint64
  9634. for shift := uint(0); ; shift += 7 {
  9635. if shift >= 64 {
  9636. return ErrIntOverflowTypes
  9637. }
  9638. if iNdEx >= l {
  9639. return io.ErrUnexpectedEOF
  9640. }
  9641. b := dAtA[iNdEx]
  9642. iNdEx++
  9643. wire |= uint64(b&0x7F) << shift
  9644. if b < 0x80 {
  9645. break
  9646. }
  9647. }
  9648. fieldNum := int32(wire >> 3)
  9649. wireType := int(wire & 0x7)
  9650. if wireType == 4 {
  9651. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9652. }
  9653. if fieldNum <= 0 {
  9654. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9655. }
  9656. switch fieldNum {
  9657. case 1:
  9658. if wireType != 2 {
  9659. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9660. }
  9661. var stringLen uint64
  9662. for shift := uint(0); ; shift += 7 {
  9663. if shift >= 64 {
  9664. return ErrIntOverflowTypes
  9665. }
  9666. if iNdEx >= l {
  9667. return io.ErrUnexpectedEOF
  9668. }
  9669. b := dAtA[iNdEx]
  9670. iNdEx++
  9671. stringLen |= uint64(b&0x7F) << shift
  9672. if b < 0x80 {
  9673. break
  9674. }
  9675. }
  9676. intStringLen := int(stringLen)
  9677. if intStringLen < 0 {
  9678. return ErrInvalidLengthTypes
  9679. }
  9680. postIndex := iNdEx + intStringLen
  9681. if postIndex < 0 {
  9682. return ErrInvalidLengthTypes
  9683. }
  9684. if postIndex > l {
  9685. return io.ErrUnexpectedEOF
  9686. }
  9687. m.Message = string(dAtA[iNdEx:postIndex])
  9688. iNdEx = postIndex
  9689. default:
  9690. iNdEx = preIndex
  9691. skippy, err := skipTypes(dAtA[iNdEx:])
  9692. if err != nil {
  9693. return err
  9694. }
  9695. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9696. return ErrInvalidLengthTypes
  9697. }
  9698. if (iNdEx + skippy) > l {
  9699. return io.ErrUnexpectedEOF
  9700. }
  9701. iNdEx += skippy
  9702. }
  9703. }
  9704. if iNdEx > l {
  9705. return io.ErrUnexpectedEOF
  9706. }
  9707. return nil
  9708. }
  9709. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9710. l := len(dAtA)
  9711. iNdEx := 0
  9712. for iNdEx < l {
  9713. preIndex := iNdEx
  9714. var wire uint64
  9715. for shift := uint(0); ; shift += 7 {
  9716. if shift >= 64 {
  9717. return ErrIntOverflowTypes
  9718. }
  9719. if iNdEx >= l {
  9720. return io.ErrUnexpectedEOF
  9721. }
  9722. b := dAtA[iNdEx]
  9723. iNdEx++
  9724. wire |= uint64(b&0x7F) << shift
  9725. if b < 0x80 {
  9726. break
  9727. }
  9728. }
  9729. fieldNum := int32(wire >> 3)
  9730. wireType := int(wire & 0x7)
  9731. if wireType == 4 {
  9732. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9733. }
  9734. if fieldNum <= 0 {
  9735. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9736. }
  9737. switch fieldNum {
  9738. default:
  9739. iNdEx = preIndex
  9740. skippy, err := skipTypes(dAtA[iNdEx:])
  9741. if err != nil {
  9742. return err
  9743. }
  9744. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9745. return ErrInvalidLengthTypes
  9746. }
  9747. if (iNdEx + skippy) > l {
  9748. return io.ErrUnexpectedEOF
  9749. }
  9750. iNdEx += skippy
  9751. }
  9752. }
  9753. if iNdEx > l {
  9754. return io.ErrUnexpectedEOF
  9755. }
  9756. return nil
  9757. }
  9758. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  9759. l := len(dAtA)
  9760. iNdEx := 0
  9761. for iNdEx < l {
  9762. preIndex := iNdEx
  9763. var wire uint64
  9764. for shift := uint(0); ; shift += 7 {
  9765. if shift >= 64 {
  9766. return ErrIntOverflowTypes
  9767. }
  9768. if iNdEx >= l {
  9769. return io.ErrUnexpectedEOF
  9770. }
  9771. b := dAtA[iNdEx]
  9772. iNdEx++
  9773. wire |= uint64(b&0x7F) << shift
  9774. if b < 0x80 {
  9775. break
  9776. }
  9777. }
  9778. fieldNum := int32(wire >> 3)
  9779. wireType := int(wire & 0x7)
  9780. if wireType == 4 {
  9781. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  9782. }
  9783. if fieldNum <= 0 {
  9784. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9785. }
  9786. switch fieldNum {
  9787. case 1:
  9788. if wireType != 2 {
  9789. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9790. }
  9791. var stringLen uint64
  9792. for shift := uint(0); ; shift += 7 {
  9793. if shift >= 64 {
  9794. return ErrIntOverflowTypes
  9795. }
  9796. if iNdEx >= l {
  9797. return io.ErrUnexpectedEOF
  9798. }
  9799. b := dAtA[iNdEx]
  9800. iNdEx++
  9801. stringLen |= uint64(b&0x7F) << shift
  9802. if b < 0x80 {
  9803. break
  9804. }
  9805. }
  9806. intStringLen := int(stringLen)
  9807. if intStringLen < 0 {
  9808. return ErrInvalidLengthTypes
  9809. }
  9810. postIndex := iNdEx + intStringLen
  9811. if postIndex < 0 {
  9812. return ErrInvalidLengthTypes
  9813. }
  9814. if postIndex > l {
  9815. return io.ErrUnexpectedEOF
  9816. }
  9817. m.Data = string(dAtA[iNdEx:postIndex])
  9818. iNdEx = postIndex
  9819. case 2:
  9820. if wireType != 2 {
  9821. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9822. }
  9823. var stringLen uint64
  9824. for shift := uint(0); ; shift += 7 {
  9825. if shift >= 64 {
  9826. return ErrIntOverflowTypes
  9827. }
  9828. if iNdEx >= l {
  9829. return io.ErrUnexpectedEOF
  9830. }
  9831. b := dAtA[iNdEx]
  9832. iNdEx++
  9833. stringLen |= uint64(b&0x7F) << shift
  9834. if b < 0x80 {
  9835. break
  9836. }
  9837. }
  9838. intStringLen := int(stringLen)
  9839. if intStringLen < 0 {
  9840. return ErrInvalidLengthTypes
  9841. }
  9842. postIndex := iNdEx + intStringLen
  9843. if postIndex < 0 {
  9844. return ErrInvalidLengthTypes
  9845. }
  9846. if postIndex > l {
  9847. return io.ErrUnexpectedEOF
  9848. }
  9849. m.Version = string(dAtA[iNdEx:postIndex])
  9850. iNdEx = postIndex
  9851. case 3:
  9852. if wireType != 0 {
  9853. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9854. }
  9855. m.AppVersion = 0
  9856. for shift := uint(0); ; shift += 7 {
  9857. if shift >= 64 {
  9858. return ErrIntOverflowTypes
  9859. }
  9860. if iNdEx >= l {
  9861. return io.ErrUnexpectedEOF
  9862. }
  9863. b := dAtA[iNdEx]
  9864. iNdEx++
  9865. m.AppVersion |= uint64(b&0x7F) << shift
  9866. if b < 0x80 {
  9867. break
  9868. }
  9869. }
  9870. case 4:
  9871. if wireType != 0 {
  9872. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9873. }
  9874. m.LastBlockHeight = 0
  9875. for shift := uint(0); ; shift += 7 {
  9876. if shift >= 64 {
  9877. return ErrIntOverflowTypes
  9878. }
  9879. if iNdEx >= l {
  9880. return io.ErrUnexpectedEOF
  9881. }
  9882. b := dAtA[iNdEx]
  9883. iNdEx++
  9884. m.LastBlockHeight |= int64(b&0x7F) << shift
  9885. if b < 0x80 {
  9886. break
  9887. }
  9888. }
  9889. case 5:
  9890. if wireType != 2 {
  9891. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9892. }
  9893. var byteLen int
  9894. for shift := uint(0); ; shift += 7 {
  9895. if shift >= 64 {
  9896. return ErrIntOverflowTypes
  9897. }
  9898. if iNdEx >= l {
  9899. return io.ErrUnexpectedEOF
  9900. }
  9901. b := dAtA[iNdEx]
  9902. iNdEx++
  9903. byteLen |= int(b&0x7F) << shift
  9904. if b < 0x80 {
  9905. break
  9906. }
  9907. }
  9908. if byteLen < 0 {
  9909. return ErrInvalidLengthTypes
  9910. }
  9911. postIndex := iNdEx + byteLen
  9912. if postIndex < 0 {
  9913. return ErrInvalidLengthTypes
  9914. }
  9915. if postIndex > l {
  9916. return io.ErrUnexpectedEOF
  9917. }
  9918. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9919. if m.LastBlockAppHash == nil {
  9920. m.LastBlockAppHash = []byte{}
  9921. }
  9922. iNdEx = postIndex
  9923. default:
  9924. iNdEx = preIndex
  9925. skippy, err := skipTypes(dAtA[iNdEx:])
  9926. if err != nil {
  9927. return err
  9928. }
  9929. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9930. return ErrInvalidLengthTypes
  9931. }
  9932. if (iNdEx + skippy) > l {
  9933. return io.ErrUnexpectedEOF
  9934. }
  9935. iNdEx += skippy
  9936. }
  9937. }
  9938. if iNdEx > l {
  9939. return io.ErrUnexpectedEOF
  9940. }
  9941. return nil
  9942. }
  9943. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  9944. l := len(dAtA)
  9945. iNdEx := 0
  9946. for iNdEx < l {
  9947. preIndex := iNdEx
  9948. var wire uint64
  9949. for shift := uint(0); ; shift += 7 {
  9950. if shift >= 64 {
  9951. return ErrIntOverflowTypes
  9952. }
  9953. if iNdEx >= l {
  9954. return io.ErrUnexpectedEOF
  9955. }
  9956. b := dAtA[iNdEx]
  9957. iNdEx++
  9958. wire |= uint64(b&0x7F) << shift
  9959. if b < 0x80 {
  9960. break
  9961. }
  9962. }
  9963. fieldNum := int32(wire >> 3)
  9964. wireType := int(wire & 0x7)
  9965. if wireType == 4 {
  9966. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  9967. }
  9968. if fieldNum <= 0 {
  9969. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  9970. }
  9971. switch fieldNum {
  9972. case 1:
  9973. if wireType != 2 {
  9974. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  9975. }
  9976. var msglen int
  9977. for shift := uint(0); ; shift += 7 {
  9978. if shift >= 64 {
  9979. return ErrIntOverflowTypes
  9980. }
  9981. if iNdEx >= l {
  9982. return io.ErrUnexpectedEOF
  9983. }
  9984. b := dAtA[iNdEx]
  9985. iNdEx++
  9986. msglen |= int(b&0x7F) << shift
  9987. if b < 0x80 {
  9988. break
  9989. }
  9990. }
  9991. if msglen < 0 {
  9992. return ErrInvalidLengthTypes
  9993. }
  9994. postIndex := iNdEx + msglen
  9995. if postIndex < 0 {
  9996. return ErrInvalidLengthTypes
  9997. }
  9998. if postIndex > l {
  9999. return io.ErrUnexpectedEOF
  10000. }
  10001. if m.ConsensusParams == nil {
  10002. m.ConsensusParams = &ConsensusParams{}
  10003. }
  10004. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10005. return err
  10006. }
  10007. iNdEx = postIndex
  10008. case 2:
  10009. if wireType != 2 {
  10010. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  10011. }
  10012. var msglen int
  10013. for shift := uint(0); ; shift += 7 {
  10014. if shift >= 64 {
  10015. return ErrIntOverflowTypes
  10016. }
  10017. if iNdEx >= l {
  10018. return io.ErrUnexpectedEOF
  10019. }
  10020. b := dAtA[iNdEx]
  10021. iNdEx++
  10022. msglen |= int(b&0x7F) << shift
  10023. if b < 0x80 {
  10024. break
  10025. }
  10026. }
  10027. if msglen < 0 {
  10028. return ErrInvalidLengthTypes
  10029. }
  10030. postIndex := iNdEx + msglen
  10031. if postIndex < 0 {
  10032. return ErrInvalidLengthTypes
  10033. }
  10034. if postIndex > l {
  10035. return io.ErrUnexpectedEOF
  10036. }
  10037. m.Validators = append(m.Validators, ValidatorUpdate{})
  10038. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10039. return err
  10040. }
  10041. iNdEx = postIndex
  10042. case 3:
  10043. if wireType != 2 {
  10044. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  10045. }
  10046. var byteLen int
  10047. for shift := uint(0); ; shift += 7 {
  10048. if shift >= 64 {
  10049. return ErrIntOverflowTypes
  10050. }
  10051. if iNdEx >= l {
  10052. return io.ErrUnexpectedEOF
  10053. }
  10054. b := dAtA[iNdEx]
  10055. iNdEx++
  10056. byteLen |= int(b&0x7F) << shift
  10057. if b < 0x80 {
  10058. break
  10059. }
  10060. }
  10061. if byteLen < 0 {
  10062. return ErrInvalidLengthTypes
  10063. }
  10064. postIndex := iNdEx + byteLen
  10065. if postIndex < 0 {
  10066. return ErrInvalidLengthTypes
  10067. }
  10068. if postIndex > l {
  10069. return io.ErrUnexpectedEOF
  10070. }
  10071. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  10072. if m.AppHash == nil {
  10073. m.AppHash = []byte{}
  10074. }
  10075. iNdEx = postIndex
  10076. default:
  10077. iNdEx = preIndex
  10078. skippy, err := skipTypes(dAtA[iNdEx:])
  10079. if err != nil {
  10080. return err
  10081. }
  10082. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10083. return ErrInvalidLengthTypes
  10084. }
  10085. if (iNdEx + skippy) > l {
  10086. return io.ErrUnexpectedEOF
  10087. }
  10088. iNdEx += skippy
  10089. }
  10090. }
  10091. if iNdEx > l {
  10092. return io.ErrUnexpectedEOF
  10093. }
  10094. return nil
  10095. }
  10096. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  10097. l := len(dAtA)
  10098. iNdEx := 0
  10099. for iNdEx < l {
  10100. preIndex := iNdEx
  10101. var wire uint64
  10102. for shift := uint(0); ; shift += 7 {
  10103. if shift >= 64 {
  10104. return ErrIntOverflowTypes
  10105. }
  10106. if iNdEx >= l {
  10107. return io.ErrUnexpectedEOF
  10108. }
  10109. b := dAtA[iNdEx]
  10110. iNdEx++
  10111. wire |= uint64(b&0x7F) << shift
  10112. if b < 0x80 {
  10113. break
  10114. }
  10115. }
  10116. fieldNum := int32(wire >> 3)
  10117. wireType := int(wire & 0x7)
  10118. if wireType == 4 {
  10119. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  10120. }
  10121. if fieldNum <= 0 {
  10122. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  10123. }
  10124. switch fieldNum {
  10125. case 1:
  10126. if wireType != 0 {
  10127. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10128. }
  10129. m.Code = 0
  10130. for shift := uint(0); ; shift += 7 {
  10131. if shift >= 64 {
  10132. return ErrIntOverflowTypes
  10133. }
  10134. if iNdEx >= l {
  10135. return io.ErrUnexpectedEOF
  10136. }
  10137. b := dAtA[iNdEx]
  10138. iNdEx++
  10139. m.Code |= uint32(b&0x7F) << shift
  10140. if b < 0x80 {
  10141. break
  10142. }
  10143. }
  10144. case 3:
  10145. if wireType != 2 {
  10146. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10147. }
  10148. var stringLen uint64
  10149. for shift := uint(0); ; shift += 7 {
  10150. if shift >= 64 {
  10151. return ErrIntOverflowTypes
  10152. }
  10153. if iNdEx >= l {
  10154. return io.ErrUnexpectedEOF
  10155. }
  10156. b := dAtA[iNdEx]
  10157. iNdEx++
  10158. stringLen |= uint64(b&0x7F) << shift
  10159. if b < 0x80 {
  10160. break
  10161. }
  10162. }
  10163. intStringLen := int(stringLen)
  10164. if intStringLen < 0 {
  10165. return ErrInvalidLengthTypes
  10166. }
  10167. postIndex := iNdEx + intStringLen
  10168. if postIndex < 0 {
  10169. return ErrInvalidLengthTypes
  10170. }
  10171. if postIndex > l {
  10172. return io.ErrUnexpectedEOF
  10173. }
  10174. m.Log = string(dAtA[iNdEx:postIndex])
  10175. iNdEx = postIndex
  10176. case 4:
  10177. if wireType != 2 {
  10178. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10179. }
  10180. var stringLen uint64
  10181. for shift := uint(0); ; shift += 7 {
  10182. if shift >= 64 {
  10183. return ErrIntOverflowTypes
  10184. }
  10185. if iNdEx >= l {
  10186. return io.ErrUnexpectedEOF
  10187. }
  10188. b := dAtA[iNdEx]
  10189. iNdEx++
  10190. stringLen |= uint64(b&0x7F) << shift
  10191. if b < 0x80 {
  10192. break
  10193. }
  10194. }
  10195. intStringLen := int(stringLen)
  10196. if intStringLen < 0 {
  10197. return ErrInvalidLengthTypes
  10198. }
  10199. postIndex := iNdEx + intStringLen
  10200. if postIndex < 0 {
  10201. return ErrInvalidLengthTypes
  10202. }
  10203. if postIndex > l {
  10204. return io.ErrUnexpectedEOF
  10205. }
  10206. m.Info = string(dAtA[iNdEx:postIndex])
  10207. iNdEx = postIndex
  10208. case 5:
  10209. if wireType != 0 {
  10210. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10211. }
  10212. m.Index = 0
  10213. for shift := uint(0); ; shift += 7 {
  10214. if shift >= 64 {
  10215. return ErrIntOverflowTypes
  10216. }
  10217. if iNdEx >= l {
  10218. return io.ErrUnexpectedEOF
  10219. }
  10220. b := dAtA[iNdEx]
  10221. iNdEx++
  10222. m.Index |= int64(b&0x7F) << shift
  10223. if b < 0x80 {
  10224. break
  10225. }
  10226. }
  10227. case 6:
  10228. if wireType != 2 {
  10229. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10230. }
  10231. var byteLen int
  10232. for shift := uint(0); ; shift += 7 {
  10233. if shift >= 64 {
  10234. return ErrIntOverflowTypes
  10235. }
  10236. if iNdEx >= l {
  10237. return io.ErrUnexpectedEOF
  10238. }
  10239. b := dAtA[iNdEx]
  10240. iNdEx++
  10241. byteLen |= int(b&0x7F) << shift
  10242. if b < 0x80 {
  10243. break
  10244. }
  10245. }
  10246. if byteLen < 0 {
  10247. return ErrInvalidLengthTypes
  10248. }
  10249. postIndex := iNdEx + byteLen
  10250. if postIndex < 0 {
  10251. return ErrInvalidLengthTypes
  10252. }
  10253. if postIndex > l {
  10254. return io.ErrUnexpectedEOF
  10255. }
  10256. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10257. if m.Key == nil {
  10258. m.Key = []byte{}
  10259. }
  10260. iNdEx = postIndex
  10261. case 7:
  10262. if wireType != 2 {
  10263. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10264. }
  10265. var byteLen int
  10266. for shift := uint(0); ; shift += 7 {
  10267. if shift >= 64 {
  10268. return ErrIntOverflowTypes
  10269. }
  10270. if iNdEx >= l {
  10271. return io.ErrUnexpectedEOF
  10272. }
  10273. b := dAtA[iNdEx]
  10274. iNdEx++
  10275. byteLen |= int(b&0x7F) << shift
  10276. if b < 0x80 {
  10277. break
  10278. }
  10279. }
  10280. if byteLen < 0 {
  10281. return ErrInvalidLengthTypes
  10282. }
  10283. postIndex := iNdEx + byteLen
  10284. if postIndex < 0 {
  10285. return ErrInvalidLengthTypes
  10286. }
  10287. if postIndex > l {
  10288. return io.ErrUnexpectedEOF
  10289. }
  10290. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10291. if m.Value == nil {
  10292. m.Value = []byte{}
  10293. }
  10294. iNdEx = postIndex
  10295. case 8:
  10296. if wireType != 2 {
  10297. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", 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. if m.ProofOps == nil {
  10325. m.ProofOps = &crypto.ProofOps{}
  10326. }
  10327. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10328. return err
  10329. }
  10330. iNdEx = postIndex
  10331. case 9:
  10332. if wireType != 0 {
  10333. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10334. }
  10335. m.Height = 0
  10336. for shift := uint(0); ; shift += 7 {
  10337. if shift >= 64 {
  10338. return ErrIntOverflowTypes
  10339. }
  10340. if iNdEx >= l {
  10341. return io.ErrUnexpectedEOF
  10342. }
  10343. b := dAtA[iNdEx]
  10344. iNdEx++
  10345. m.Height |= int64(b&0x7F) << shift
  10346. if b < 0x80 {
  10347. break
  10348. }
  10349. }
  10350. case 10:
  10351. if wireType != 2 {
  10352. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10353. }
  10354. var stringLen uint64
  10355. for shift := uint(0); ; shift += 7 {
  10356. if shift >= 64 {
  10357. return ErrIntOverflowTypes
  10358. }
  10359. if iNdEx >= l {
  10360. return io.ErrUnexpectedEOF
  10361. }
  10362. b := dAtA[iNdEx]
  10363. iNdEx++
  10364. stringLen |= uint64(b&0x7F) << shift
  10365. if b < 0x80 {
  10366. break
  10367. }
  10368. }
  10369. intStringLen := int(stringLen)
  10370. if intStringLen < 0 {
  10371. return ErrInvalidLengthTypes
  10372. }
  10373. postIndex := iNdEx + intStringLen
  10374. if postIndex < 0 {
  10375. return ErrInvalidLengthTypes
  10376. }
  10377. if postIndex > l {
  10378. return io.ErrUnexpectedEOF
  10379. }
  10380. m.Codespace = string(dAtA[iNdEx:postIndex])
  10381. iNdEx = postIndex
  10382. default:
  10383. iNdEx = preIndex
  10384. skippy, err := skipTypes(dAtA[iNdEx:])
  10385. if err != nil {
  10386. return err
  10387. }
  10388. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10389. return ErrInvalidLengthTypes
  10390. }
  10391. if (iNdEx + skippy) > l {
  10392. return io.ErrUnexpectedEOF
  10393. }
  10394. iNdEx += skippy
  10395. }
  10396. }
  10397. if iNdEx > l {
  10398. return io.ErrUnexpectedEOF
  10399. }
  10400. return nil
  10401. }
  10402. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10403. l := len(dAtA)
  10404. iNdEx := 0
  10405. for iNdEx < l {
  10406. preIndex := iNdEx
  10407. var wire uint64
  10408. for shift := uint(0); ; shift += 7 {
  10409. if shift >= 64 {
  10410. return ErrIntOverflowTypes
  10411. }
  10412. if iNdEx >= l {
  10413. return io.ErrUnexpectedEOF
  10414. }
  10415. b := dAtA[iNdEx]
  10416. iNdEx++
  10417. wire |= uint64(b&0x7F) << shift
  10418. if b < 0x80 {
  10419. break
  10420. }
  10421. }
  10422. fieldNum := int32(wire >> 3)
  10423. wireType := int(wire & 0x7)
  10424. if wireType == 4 {
  10425. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10426. }
  10427. if fieldNum <= 0 {
  10428. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10429. }
  10430. switch fieldNum {
  10431. case 1:
  10432. if wireType != 2 {
  10433. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10434. }
  10435. var msglen int
  10436. for shift := uint(0); ; shift += 7 {
  10437. if shift >= 64 {
  10438. return ErrIntOverflowTypes
  10439. }
  10440. if iNdEx >= l {
  10441. return io.ErrUnexpectedEOF
  10442. }
  10443. b := dAtA[iNdEx]
  10444. iNdEx++
  10445. msglen |= int(b&0x7F) << shift
  10446. if b < 0x80 {
  10447. break
  10448. }
  10449. }
  10450. if msglen < 0 {
  10451. return ErrInvalidLengthTypes
  10452. }
  10453. postIndex := iNdEx + msglen
  10454. if postIndex < 0 {
  10455. return ErrInvalidLengthTypes
  10456. }
  10457. if postIndex > l {
  10458. return io.ErrUnexpectedEOF
  10459. }
  10460. m.Events = append(m.Events, Event{})
  10461. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10462. return err
  10463. }
  10464. iNdEx = postIndex
  10465. default:
  10466. iNdEx = preIndex
  10467. skippy, err := skipTypes(dAtA[iNdEx:])
  10468. if err != nil {
  10469. return err
  10470. }
  10471. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10472. return ErrInvalidLengthTypes
  10473. }
  10474. if (iNdEx + skippy) > l {
  10475. return io.ErrUnexpectedEOF
  10476. }
  10477. iNdEx += skippy
  10478. }
  10479. }
  10480. if iNdEx > l {
  10481. return io.ErrUnexpectedEOF
  10482. }
  10483. return nil
  10484. }
  10485. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10486. l := len(dAtA)
  10487. iNdEx := 0
  10488. for iNdEx < l {
  10489. preIndex := iNdEx
  10490. var wire uint64
  10491. for shift := uint(0); ; shift += 7 {
  10492. if shift >= 64 {
  10493. return ErrIntOverflowTypes
  10494. }
  10495. if iNdEx >= l {
  10496. return io.ErrUnexpectedEOF
  10497. }
  10498. b := dAtA[iNdEx]
  10499. iNdEx++
  10500. wire |= uint64(b&0x7F) << shift
  10501. if b < 0x80 {
  10502. break
  10503. }
  10504. }
  10505. fieldNum := int32(wire >> 3)
  10506. wireType := int(wire & 0x7)
  10507. if wireType == 4 {
  10508. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10509. }
  10510. if fieldNum <= 0 {
  10511. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10512. }
  10513. switch fieldNum {
  10514. case 1:
  10515. if wireType != 0 {
  10516. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10517. }
  10518. m.Code = 0
  10519. for shift := uint(0); ; shift += 7 {
  10520. if shift >= 64 {
  10521. return ErrIntOverflowTypes
  10522. }
  10523. if iNdEx >= l {
  10524. return io.ErrUnexpectedEOF
  10525. }
  10526. b := dAtA[iNdEx]
  10527. iNdEx++
  10528. m.Code |= uint32(b&0x7F) << shift
  10529. if b < 0x80 {
  10530. break
  10531. }
  10532. }
  10533. case 2:
  10534. if wireType != 2 {
  10535. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10536. }
  10537. var byteLen int
  10538. for shift := uint(0); ; shift += 7 {
  10539. if shift >= 64 {
  10540. return ErrIntOverflowTypes
  10541. }
  10542. if iNdEx >= l {
  10543. return io.ErrUnexpectedEOF
  10544. }
  10545. b := dAtA[iNdEx]
  10546. iNdEx++
  10547. byteLen |= int(b&0x7F) << shift
  10548. if b < 0x80 {
  10549. break
  10550. }
  10551. }
  10552. if byteLen < 0 {
  10553. return ErrInvalidLengthTypes
  10554. }
  10555. postIndex := iNdEx + byteLen
  10556. if postIndex < 0 {
  10557. return ErrInvalidLengthTypes
  10558. }
  10559. if postIndex > l {
  10560. return io.ErrUnexpectedEOF
  10561. }
  10562. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10563. if m.Data == nil {
  10564. m.Data = []byte{}
  10565. }
  10566. iNdEx = postIndex
  10567. case 3:
  10568. if wireType != 2 {
  10569. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10570. }
  10571. var stringLen uint64
  10572. for shift := uint(0); ; shift += 7 {
  10573. if shift >= 64 {
  10574. return ErrIntOverflowTypes
  10575. }
  10576. if iNdEx >= l {
  10577. return io.ErrUnexpectedEOF
  10578. }
  10579. b := dAtA[iNdEx]
  10580. iNdEx++
  10581. stringLen |= uint64(b&0x7F) << shift
  10582. if b < 0x80 {
  10583. break
  10584. }
  10585. }
  10586. intStringLen := int(stringLen)
  10587. if intStringLen < 0 {
  10588. return ErrInvalidLengthTypes
  10589. }
  10590. postIndex := iNdEx + intStringLen
  10591. if postIndex < 0 {
  10592. return ErrInvalidLengthTypes
  10593. }
  10594. if postIndex > l {
  10595. return io.ErrUnexpectedEOF
  10596. }
  10597. m.Log = string(dAtA[iNdEx:postIndex])
  10598. iNdEx = postIndex
  10599. case 4:
  10600. if wireType != 2 {
  10601. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10602. }
  10603. var stringLen uint64
  10604. for shift := uint(0); ; shift += 7 {
  10605. if shift >= 64 {
  10606. return ErrIntOverflowTypes
  10607. }
  10608. if iNdEx >= l {
  10609. return io.ErrUnexpectedEOF
  10610. }
  10611. b := dAtA[iNdEx]
  10612. iNdEx++
  10613. stringLen |= uint64(b&0x7F) << shift
  10614. if b < 0x80 {
  10615. break
  10616. }
  10617. }
  10618. intStringLen := int(stringLen)
  10619. if intStringLen < 0 {
  10620. return ErrInvalidLengthTypes
  10621. }
  10622. postIndex := iNdEx + intStringLen
  10623. if postIndex < 0 {
  10624. return ErrInvalidLengthTypes
  10625. }
  10626. if postIndex > l {
  10627. return io.ErrUnexpectedEOF
  10628. }
  10629. m.Info = string(dAtA[iNdEx:postIndex])
  10630. iNdEx = postIndex
  10631. case 5:
  10632. if wireType != 0 {
  10633. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10634. }
  10635. m.GasWanted = 0
  10636. for shift := uint(0); ; shift += 7 {
  10637. if shift >= 64 {
  10638. return ErrIntOverflowTypes
  10639. }
  10640. if iNdEx >= l {
  10641. return io.ErrUnexpectedEOF
  10642. }
  10643. b := dAtA[iNdEx]
  10644. iNdEx++
  10645. m.GasWanted |= int64(b&0x7F) << shift
  10646. if b < 0x80 {
  10647. break
  10648. }
  10649. }
  10650. case 6:
  10651. if wireType != 0 {
  10652. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10653. }
  10654. m.GasUsed = 0
  10655. for shift := uint(0); ; shift += 7 {
  10656. if shift >= 64 {
  10657. return ErrIntOverflowTypes
  10658. }
  10659. if iNdEx >= l {
  10660. return io.ErrUnexpectedEOF
  10661. }
  10662. b := dAtA[iNdEx]
  10663. iNdEx++
  10664. m.GasUsed |= int64(b&0x7F) << shift
  10665. if b < 0x80 {
  10666. break
  10667. }
  10668. }
  10669. case 7:
  10670. if wireType != 2 {
  10671. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10672. }
  10673. var msglen int
  10674. for shift := uint(0); ; shift += 7 {
  10675. if shift >= 64 {
  10676. return ErrIntOverflowTypes
  10677. }
  10678. if iNdEx >= l {
  10679. return io.ErrUnexpectedEOF
  10680. }
  10681. b := dAtA[iNdEx]
  10682. iNdEx++
  10683. msglen |= int(b&0x7F) << shift
  10684. if b < 0x80 {
  10685. break
  10686. }
  10687. }
  10688. if msglen < 0 {
  10689. return ErrInvalidLengthTypes
  10690. }
  10691. postIndex := iNdEx + msglen
  10692. if postIndex < 0 {
  10693. return ErrInvalidLengthTypes
  10694. }
  10695. if postIndex > l {
  10696. return io.ErrUnexpectedEOF
  10697. }
  10698. m.Events = append(m.Events, Event{})
  10699. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10700. return err
  10701. }
  10702. iNdEx = postIndex
  10703. case 8:
  10704. if wireType != 2 {
  10705. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10706. }
  10707. var stringLen uint64
  10708. for shift := uint(0); ; shift += 7 {
  10709. if shift >= 64 {
  10710. return ErrIntOverflowTypes
  10711. }
  10712. if iNdEx >= l {
  10713. return io.ErrUnexpectedEOF
  10714. }
  10715. b := dAtA[iNdEx]
  10716. iNdEx++
  10717. stringLen |= uint64(b&0x7F) << shift
  10718. if b < 0x80 {
  10719. break
  10720. }
  10721. }
  10722. intStringLen := int(stringLen)
  10723. if intStringLen < 0 {
  10724. return ErrInvalidLengthTypes
  10725. }
  10726. postIndex := iNdEx + intStringLen
  10727. if postIndex < 0 {
  10728. return ErrInvalidLengthTypes
  10729. }
  10730. if postIndex > l {
  10731. return io.ErrUnexpectedEOF
  10732. }
  10733. m.Codespace = string(dAtA[iNdEx:postIndex])
  10734. iNdEx = postIndex
  10735. default:
  10736. iNdEx = preIndex
  10737. skippy, err := skipTypes(dAtA[iNdEx:])
  10738. if err != nil {
  10739. return err
  10740. }
  10741. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10742. return ErrInvalidLengthTypes
  10743. }
  10744. if (iNdEx + skippy) > l {
  10745. return io.ErrUnexpectedEOF
  10746. }
  10747. iNdEx += skippy
  10748. }
  10749. }
  10750. if iNdEx > l {
  10751. return io.ErrUnexpectedEOF
  10752. }
  10753. return nil
  10754. }
  10755. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10756. l := len(dAtA)
  10757. iNdEx := 0
  10758. for iNdEx < l {
  10759. preIndex := iNdEx
  10760. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  10771. if b < 0x80 {
  10772. break
  10773. }
  10774. }
  10775. fieldNum := int32(wire >> 3)
  10776. wireType := int(wire & 0x7)
  10777. if wireType == 4 {
  10778. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10779. }
  10780. if fieldNum <= 0 {
  10781. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10782. }
  10783. switch fieldNum {
  10784. case 1:
  10785. if wireType != 0 {
  10786. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10787. }
  10788. m.Code = 0
  10789. for shift := uint(0); ; shift += 7 {
  10790. if shift >= 64 {
  10791. return ErrIntOverflowTypes
  10792. }
  10793. if iNdEx >= l {
  10794. return io.ErrUnexpectedEOF
  10795. }
  10796. b := dAtA[iNdEx]
  10797. iNdEx++
  10798. m.Code |= uint32(b&0x7F) << shift
  10799. if b < 0x80 {
  10800. break
  10801. }
  10802. }
  10803. case 2:
  10804. if wireType != 2 {
  10805. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10806. }
  10807. var byteLen int
  10808. for shift := uint(0); ; shift += 7 {
  10809. if shift >= 64 {
  10810. return ErrIntOverflowTypes
  10811. }
  10812. if iNdEx >= l {
  10813. return io.ErrUnexpectedEOF
  10814. }
  10815. b := dAtA[iNdEx]
  10816. iNdEx++
  10817. byteLen |= int(b&0x7F) << shift
  10818. if b < 0x80 {
  10819. break
  10820. }
  10821. }
  10822. if byteLen < 0 {
  10823. return ErrInvalidLengthTypes
  10824. }
  10825. postIndex := iNdEx + byteLen
  10826. if postIndex < 0 {
  10827. return ErrInvalidLengthTypes
  10828. }
  10829. if postIndex > l {
  10830. return io.ErrUnexpectedEOF
  10831. }
  10832. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10833. if m.Data == nil {
  10834. m.Data = []byte{}
  10835. }
  10836. iNdEx = postIndex
  10837. case 3:
  10838. if wireType != 2 {
  10839. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10840. }
  10841. var stringLen uint64
  10842. for shift := uint(0); ; shift += 7 {
  10843. if shift >= 64 {
  10844. return ErrIntOverflowTypes
  10845. }
  10846. if iNdEx >= l {
  10847. return io.ErrUnexpectedEOF
  10848. }
  10849. b := dAtA[iNdEx]
  10850. iNdEx++
  10851. stringLen |= uint64(b&0x7F) << shift
  10852. if b < 0x80 {
  10853. break
  10854. }
  10855. }
  10856. intStringLen := int(stringLen)
  10857. if intStringLen < 0 {
  10858. return ErrInvalidLengthTypes
  10859. }
  10860. postIndex := iNdEx + intStringLen
  10861. if postIndex < 0 {
  10862. return ErrInvalidLengthTypes
  10863. }
  10864. if postIndex > l {
  10865. return io.ErrUnexpectedEOF
  10866. }
  10867. m.Log = string(dAtA[iNdEx:postIndex])
  10868. iNdEx = postIndex
  10869. case 4:
  10870. if wireType != 2 {
  10871. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10872. }
  10873. var stringLen uint64
  10874. for shift := uint(0); ; shift += 7 {
  10875. if shift >= 64 {
  10876. return ErrIntOverflowTypes
  10877. }
  10878. if iNdEx >= l {
  10879. return io.ErrUnexpectedEOF
  10880. }
  10881. b := dAtA[iNdEx]
  10882. iNdEx++
  10883. stringLen |= uint64(b&0x7F) << shift
  10884. if b < 0x80 {
  10885. break
  10886. }
  10887. }
  10888. intStringLen := int(stringLen)
  10889. if intStringLen < 0 {
  10890. return ErrInvalidLengthTypes
  10891. }
  10892. postIndex := iNdEx + intStringLen
  10893. if postIndex < 0 {
  10894. return ErrInvalidLengthTypes
  10895. }
  10896. if postIndex > l {
  10897. return io.ErrUnexpectedEOF
  10898. }
  10899. m.Info = string(dAtA[iNdEx:postIndex])
  10900. iNdEx = postIndex
  10901. case 5:
  10902. if wireType != 0 {
  10903. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10904. }
  10905. m.GasWanted = 0
  10906. for shift := uint(0); ; shift += 7 {
  10907. if shift >= 64 {
  10908. return ErrIntOverflowTypes
  10909. }
  10910. if iNdEx >= l {
  10911. return io.ErrUnexpectedEOF
  10912. }
  10913. b := dAtA[iNdEx]
  10914. iNdEx++
  10915. m.GasWanted |= int64(b&0x7F) << shift
  10916. if b < 0x80 {
  10917. break
  10918. }
  10919. }
  10920. case 6:
  10921. if wireType != 0 {
  10922. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10923. }
  10924. m.GasUsed = 0
  10925. for shift := uint(0); ; shift += 7 {
  10926. if shift >= 64 {
  10927. return ErrIntOverflowTypes
  10928. }
  10929. if iNdEx >= l {
  10930. return io.ErrUnexpectedEOF
  10931. }
  10932. b := dAtA[iNdEx]
  10933. iNdEx++
  10934. m.GasUsed |= int64(b&0x7F) << shift
  10935. if b < 0x80 {
  10936. break
  10937. }
  10938. }
  10939. case 7:
  10940. if wireType != 2 {
  10941. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10942. }
  10943. var msglen int
  10944. for shift := uint(0); ; shift += 7 {
  10945. if shift >= 64 {
  10946. return ErrIntOverflowTypes
  10947. }
  10948. if iNdEx >= l {
  10949. return io.ErrUnexpectedEOF
  10950. }
  10951. b := dAtA[iNdEx]
  10952. iNdEx++
  10953. msglen |= int(b&0x7F) << shift
  10954. if b < 0x80 {
  10955. break
  10956. }
  10957. }
  10958. if msglen < 0 {
  10959. return ErrInvalidLengthTypes
  10960. }
  10961. postIndex := iNdEx + msglen
  10962. if postIndex < 0 {
  10963. return ErrInvalidLengthTypes
  10964. }
  10965. if postIndex > l {
  10966. return io.ErrUnexpectedEOF
  10967. }
  10968. m.Events = append(m.Events, Event{})
  10969. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10970. return err
  10971. }
  10972. iNdEx = postIndex
  10973. case 8:
  10974. if wireType != 2 {
  10975. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10976. }
  10977. var stringLen uint64
  10978. for shift := uint(0); ; shift += 7 {
  10979. if shift >= 64 {
  10980. return ErrIntOverflowTypes
  10981. }
  10982. if iNdEx >= l {
  10983. return io.ErrUnexpectedEOF
  10984. }
  10985. b := dAtA[iNdEx]
  10986. iNdEx++
  10987. stringLen |= uint64(b&0x7F) << shift
  10988. if b < 0x80 {
  10989. break
  10990. }
  10991. }
  10992. intStringLen := int(stringLen)
  10993. if intStringLen < 0 {
  10994. return ErrInvalidLengthTypes
  10995. }
  10996. postIndex := iNdEx + intStringLen
  10997. if postIndex < 0 {
  10998. return ErrInvalidLengthTypes
  10999. }
  11000. if postIndex > l {
  11001. return io.ErrUnexpectedEOF
  11002. }
  11003. m.Codespace = string(dAtA[iNdEx:postIndex])
  11004. iNdEx = postIndex
  11005. default:
  11006. iNdEx = preIndex
  11007. skippy, err := skipTypes(dAtA[iNdEx:])
  11008. if err != nil {
  11009. return err
  11010. }
  11011. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11012. return ErrInvalidLengthTypes
  11013. }
  11014. if (iNdEx + skippy) > l {
  11015. return io.ErrUnexpectedEOF
  11016. }
  11017. iNdEx += skippy
  11018. }
  11019. }
  11020. if iNdEx > l {
  11021. return io.ErrUnexpectedEOF
  11022. }
  11023. return nil
  11024. }
  11025. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  11026. l := len(dAtA)
  11027. iNdEx := 0
  11028. for iNdEx < l {
  11029. preIndex := iNdEx
  11030. var wire uint64
  11031. for shift := uint(0); ; shift += 7 {
  11032. if shift >= 64 {
  11033. return ErrIntOverflowTypes
  11034. }
  11035. if iNdEx >= l {
  11036. return io.ErrUnexpectedEOF
  11037. }
  11038. b := dAtA[iNdEx]
  11039. iNdEx++
  11040. wire |= uint64(b&0x7F) << shift
  11041. if b < 0x80 {
  11042. break
  11043. }
  11044. }
  11045. fieldNum := int32(wire >> 3)
  11046. wireType := int(wire & 0x7)
  11047. if wireType == 4 {
  11048. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  11049. }
  11050. if fieldNum <= 0 {
  11051. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11052. }
  11053. switch fieldNum {
  11054. case 1:
  11055. if wireType != 2 {
  11056. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  11057. }
  11058. var msglen int
  11059. for shift := uint(0); ; shift += 7 {
  11060. if shift >= 64 {
  11061. return ErrIntOverflowTypes
  11062. }
  11063. if iNdEx >= l {
  11064. return io.ErrUnexpectedEOF
  11065. }
  11066. b := dAtA[iNdEx]
  11067. iNdEx++
  11068. msglen |= int(b&0x7F) << shift
  11069. if b < 0x80 {
  11070. break
  11071. }
  11072. }
  11073. if msglen < 0 {
  11074. return ErrInvalidLengthTypes
  11075. }
  11076. postIndex := iNdEx + msglen
  11077. if postIndex < 0 {
  11078. return ErrInvalidLengthTypes
  11079. }
  11080. if postIndex > l {
  11081. return io.ErrUnexpectedEOF
  11082. }
  11083. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  11084. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11085. return err
  11086. }
  11087. iNdEx = postIndex
  11088. case 2:
  11089. if wireType != 2 {
  11090. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  11091. }
  11092. var msglen int
  11093. for shift := uint(0); ; shift += 7 {
  11094. if shift >= 64 {
  11095. return ErrIntOverflowTypes
  11096. }
  11097. if iNdEx >= l {
  11098. return io.ErrUnexpectedEOF
  11099. }
  11100. b := dAtA[iNdEx]
  11101. iNdEx++
  11102. msglen |= int(b&0x7F) << shift
  11103. if b < 0x80 {
  11104. break
  11105. }
  11106. }
  11107. if msglen < 0 {
  11108. return ErrInvalidLengthTypes
  11109. }
  11110. postIndex := iNdEx + msglen
  11111. if postIndex < 0 {
  11112. return ErrInvalidLengthTypes
  11113. }
  11114. if postIndex > l {
  11115. return io.ErrUnexpectedEOF
  11116. }
  11117. if m.ConsensusParamUpdates == nil {
  11118. m.ConsensusParamUpdates = &ConsensusParams{}
  11119. }
  11120. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11121. return err
  11122. }
  11123. iNdEx = postIndex
  11124. case 3:
  11125. if wireType != 2 {
  11126. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11127. }
  11128. var msglen int
  11129. for shift := uint(0); ; shift += 7 {
  11130. if shift >= 64 {
  11131. return ErrIntOverflowTypes
  11132. }
  11133. if iNdEx >= l {
  11134. return io.ErrUnexpectedEOF
  11135. }
  11136. b := dAtA[iNdEx]
  11137. iNdEx++
  11138. msglen |= int(b&0x7F) << shift
  11139. if b < 0x80 {
  11140. break
  11141. }
  11142. }
  11143. if msglen < 0 {
  11144. return ErrInvalidLengthTypes
  11145. }
  11146. postIndex := iNdEx + msglen
  11147. if postIndex < 0 {
  11148. return ErrInvalidLengthTypes
  11149. }
  11150. if postIndex > l {
  11151. return io.ErrUnexpectedEOF
  11152. }
  11153. m.Events = append(m.Events, Event{})
  11154. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11155. return err
  11156. }
  11157. iNdEx = postIndex
  11158. default:
  11159. iNdEx = preIndex
  11160. skippy, err := skipTypes(dAtA[iNdEx:])
  11161. if err != nil {
  11162. return err
  11163. }
  11164. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11165. return ErrInvalidLengthTypes
  11166. }
  11167. if (iNdEx + skippy) > l {
  11168. return io.ErrUnexpectedEOF
  11169. }
  11170. iNdEx += skippy
  11171. }
  11172. }
  11173. if iNdEx > l {
  11174. return io.ErrUnexpectedEOF
  11175. }
  11176. return nil
  11177. }
  11178. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11179. l := len(dAtA)
  11180. iNdEx := 0
  11181. for iNdEx < l {
  11182. preIndex := iNdEx
  11183. var wire uint64
  11184. for shift := uint(0); ; shift += 7 {
  11185. if shift >= 64 {
  11186. return ErrIntOverflowTypes
  11187. }
  11188. if iNdEx >= l {
  11189. return io.ErrUnexpectedEOF
  11190. }
  11191. b := dAtA[iNdEx]
  11192. iNdEx++
  11193. wire |= uint64(b&0x7F) << shift
  11194. if b < 0x80 {
  11195. break
  11196. }
  11197. }
  11198. fieldNum := int32(wire >> 3)
  11199. wireType := int(wire & 0x7)
  11200. if wireType == 4 {
  11201. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11202. }
  11203. if fieldNum <= 0 {
  11204. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11205. }
  11206. switch fieldNum {
  11207. case 2:
  11208. if wireType != 2 {
  11209. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11210. }
  11211. var byteLen int
  11212. for shift := uint(0); ; shift += 7 {
  11213. if shift >= 64 {
  11214. return ErrIntOverflowTypes
  11215. }
  11216. if iNdEx >= l {
  11217. return io.ErrUnexpectedEOF
  11218. }
  11219. b := dAtA[iNdEx]
  11220. iNdEx++
  11221. byteLen |= int(b&0x7F) << shift
  11222. if b < 0x80 {
  11223. break
  11224. }
  11225. }
  11226. if byteLen < 0 {
  11227. return ErrInvalidLengthTypes
  11228. }
  11229. postIndex := iNdEx + byteLen
  11230. if postIndex < 0 {
  11231. return ErrInvalidLengthTypes
  11232. }
  11233. if postIndex > l {
  11234. return io.ErrUnexpectedEOF
  11235. }
  11236. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11237. if m.Data == nil {
  11238. m.Data = []byte{}
  11239. }
  11240. iNdEx = postIndex
  11241. case 3:
  11242. if wireType != 0 {
  11243. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11244. }
  11245. m.RetainHeight = 0
  11246. for shift := uint(0); ; shift += 7 {
  11247. if shift >= 64 {
  11248. return ErrIntOverflowTypes
  11249. }
  11250. if iNdEx >= l {
  11251. return io.ErrUnexpectedEOF
  11252. }
  11253. b := dAtA[iNdEx]
  11254. iNdEx++
  11255. m.RetainHeight |= int64(b&0x7F) << shift
  11256. if b < 0x80 {
  11257. break
  11258. }
  11259. }
  11260. default:
  11261. iNdEx = preIndex
  11262. skippy, err := skipTypes(dAtA[iNdEx:])
  11263. if err != nil {
  11264. return err
  11265. }
  11266. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11267. return ErrInvalidLengthTypes
  11268. }
  11269. if (iNdEx + skippy) > l {
  11270. return io.ErrUnexpectedEOF
  11271. }
  11272. iNdEx += skippy
  11273. }
  11274. }
  11275. if iNdEx > l {
  11276. return io.ErrUnexpectedEOF
  11277. }
  11278. return nil
  11279. }
  11280. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11281. l := len(dAtA)
  11282. iNdEx := 0
  11283. for iNdEx < l {
  11284. preIndex := iNdEx
  11285. var wire uint64
  11286. for shift := uint(0); ; shift += 7 {
  11287. if shift >= 64 {
  11288. return ErrIntOverflowTypes
  11289. }
  11290. if iNdEx >= l {
  11291. return io.ErrUnexpectedEOF
  11292. }
  11293. b := dAtA[iNdEx]
  11294. iNdEx++
  11295. wire |= uint64(b&0x7F) << shift
  11296. if b < 0x80 {
  11297. break
  11298. }
  11299. }
  11300. fieldNum := int32(wire >> 3)
  11301. wireType := int(wire & 0x7)
  11302. if wireType == 4 {
  11303. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11304. }
  11305. if fieldNum <= 0 {
  11306. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11307. }
  11308. switch fieldNum {
  11309. case 1:
  11310. if wireType != 2 {
  11311. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11312. }
  11313. var msglen int
  11314. for shift := uint(0); ; shift += 7 {
  11315. if shift >= 64 {
  11316. return ErrIntOverflowTypes
  11317. }
  11318. if iNdEx >= l {
  11319. return io.ErrUnexpectedEOF
  11320. }
  11321. b := dAtA[iNdEx]
  11322. iNdEx++
  11323. msglen |= int(b&0x7F) << shift
  11324. if b < 0x80 {
  11325. break
  11326. }
  11327. }
  11328. if msglen < 0 {
  11329. return ErrInvalidLengthTypes
  11330. }
  11331. postIndex := iNdEx + msglen
  11332. if postIndex < 0 {
  11333. return ErrInvalidLengthTypes
  11334. }
  11335. if postIndex > l {
  11336. return io.ErrUnexpectedEOF
  11337. }
  11338. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11339. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11340. return err
  11341. }
  11342. iNdEx = postIndex
  11343. default:
  11344. iNdEx = preIndex
  11345. skippy, err := skipTypes(dAtA[iNdEx:])
  11346. if err != nil {
  11347. return err
  11348. }
  11349. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11350. return ErrInvalidLengthTypes
  11351. }
  11352. if (iNdEx + skippy) > l {
  11353. return io.ErrUnexpectedEOF
  11354. }
  11355. iNdEx += skippy
  11356. }
  11357. }
  11358. if iNdEx > l {
  11359. return io.ErrUnexpectedEOF
  11360. }
  11361. return nil
  11362. }
  11363. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11364. l := len(dAtA)
  11365. iNdEx := 0
  11366. for iNdEx < l {
  11367. preIndex := iNdEx
  11368. var wire uint64
  11369. for shift := uint(0); ; shift += 7 {
  11370. if shift >= 64 {
  11371. return ErrIntOverflowTypes
  11372. }
  11373. if iNdEx >= l {
  11374. return io.ErrUnexpectedEOF
  11375. }
  11376. b := dAtA[iNdEx]
  11377. iNdEx++
  11378. wire |= uint64(b&0x7F) << shift
  11379. if b < 0x80 {
  11380. break
  11381. }
  11382. }
  11383. fieldNum := int32(wire >> 3)
  11384. wireType := int(wire & 0x7)
  11385. if wireType == 4 {
  11386. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11387. }
  11388. if fieldNum <= 0 {
  11389. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11390. }
  11391. switch fieldNum {
  11392. case 1:
  11393. if wireType != 0 {
  11394. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11395. }
  11396. m.Result = 0
  11397. for shift := uint(0); ; shift += 7 {
  11398. if shift >= 64 {
  11399. return ErrIntOverflowTypes
  11400. }
  11401. if iNdEx >= l {
  11402. return io.ErrUnexpectedEOF
  11403. }
  11404. b := dAtA[iNdEx]
  11405. iNdEx++
  11406. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11407. if b < 0x80 {
  11408. break
  11409. }
  11410. }
  11411. default:
  11412. iNdEx = preIndex
  11413. skippy, err := skipTypes(dAtA[iNdEx:])
  11414. if err != nil {
  11415. return err
  11416. }
  11417. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11418. return ErrInvalidLengthTypes
  11419. }
  11420. if (iNdEx + skippy) > l {
  11421. return io.ErrUnexpectedEOF
  11422. }
  11423. iNdEx += skippy
  11424. }
  11425. }
  11426. if iNdEx > l {
  11427. return io.ErrUnexpectedEOF
  11428. }
  11429. return nil
  11430. }
  11431. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11432. l := len(dAtA)
  11433. iNdEx := 0
  11434. for iNdEx < l {
  11435. preIndex := iNdEx
  11436. var wire uint64
  11437. for shift := uint(0); ; shift += 7 {
  11438. if shift >= 64 {
  11439. return ErrIntOverflowTypes
  11440. }
  11441. if iNdEx >= l {
  11442. return io.ErrUnexpectedEOF
  11443. }
  11444. b := dAtA[iNdEx]
  11445. iNdEx++
  11446. wire |= uint64(b&0x7F) << shift
  11447. if b < 0x80 {
  11448. break
  11449. }
  11450. }
  11451. fieldNum := int32(wire >> 3)
  11452. wireType := int(wire & 0x7)
  11453. if wireType == 4 {
  11454. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11455. }
  11456. if fieldNum <= 0 {
  11457. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11458. }
  11459. switch fieldNum {
  11460. case 1:
  11461. if wireType != 2 {
  11462. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11463. }
  11464. var byteLen int
  11465. for shift := uint(0); ; shift += 7 {
  11466. if shift >= 64 {
  11467. return ErrIntOverflowTypes
  11468. }
  11469. if iNdEx >= l {
  11470. return io.ErrUnexpectedEOF
  11471. }
  11472. b := dAtA[iNdEx]
  11473. iNdEx++
  11474. byteLen |= int(b&0x7F) << shift
  11475. if b < 0x80 {
  11476. break
  11477. }
  11478. }
  11479. if byteLen < 0 {
  11480. return ErrInvalidLengthTypes
  11481. }
  11482. postIndex := iNdEx + byteLen
  11483. if postIndex < 0 {
  11484. return ErrInvalidLengthTypes
  11485. }
  11486. if postIndex > l {
  11487. return io.ErrUnexpectedEOF
  11488. }
  11489. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11490. if m.Chunk == nil {
  11491. m.Chunk = []byte{}
  11492. }
  11493. iNdEx = postIndex
  11494. default:
  11495. iNdEx = preIndex
  11496. skippy, err := skipTypes(dAtA[iNdEx:])
  11497. if err != nil {
  11498. return err
  11499. }
  11500. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11501. return ErrInvalidLengthTypes
  11502. }
  11503. if (iNdEx + skippy) > l {
  11504. return io.ErrUnexpectedEOF
  11505. }
  11506. iNdEx += skippy
  11507. }
  11508. }
  11509. if iNdEx > l {
  11510. return io.ErrUnexpectedEOF
  11511. }
  11512. return nil
  11513. }
  11514. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11515. l := len(dAtA)
  11516. iNdEx := 0
  11517. for iNdEx < l {
  11518. preIndex := iNdEx
  11519. var wire uint64
  11520. for shift := uint(0); ; shift += 7 {
  11521. if shift >= 64 {
  11522. return ErrIntOverflowTypes
  11523. }
  11524. if iNdEx >= l {
  11525. return io.ErrUnexpectedEOF
  11526. }
  11527. b := dAtA[iNdEx]
  11528. iNdEx++
  11529. wire |= uint64(b&0x7F) << shift
  11530. if b < 0x80 {
  11531. break
  11532. }
  11533. }
  11534. fieldNum := int32(wire >> 3)
  11535. wireType := int(wire & 0x7)
  11536. if wireType == 4 {
  11537. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11538. }
  11539. if fieldNum <= 0 {
  11540. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11541. }
  11542. switch fieldNum {
  11543. case 1:
  11544. if wireType != 0 {
  11545. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11546. }
  11547. m.Result = 0
  11548. for shift := uint(0); ; shift += 7 {
  11549. if shift >= 64 {
  11550. return ErrIntOverflowTypes
  11551. }
  11552. if iNdEx >= l {
  11553. return io.ErrUnexpectedEOF
  11554. }
  11555. b := dAtA[iNdEx]
  11556. iNdEx++
  11557. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11558. if b < 0x80 {
  11559. break
  11560. }
  11561. }
  11562. case 2:
  11563. if wireType == 0 {
  11564. var v uint32
  11565. for shift := uint(0); ; shift += 7 {
  11566. if shift >= 64 {
  11567. return ErrIntOverflowTypes
  11568. }
  11569. if iNdEx >= l {
  11570. return io.ErrUnexpectedEOF
  11571. }
  11572. b := dAtA[iNdEx]
  11573. iNdEx++
  11574. v |= uint32(b&0x7F) << shift
  11575. if b < 0x80 {
  11576. break
  11577. }
  11578. }
  11579. m.RefetchChunks = append(m.RefetchChunks, v)
  11580. } else if wireType == 2 {
  11581. var packedLen int
  11582. for shift := uint(0); ; shift += 7 {
  11583. if shift >= 64 {
  11584. return ErrIntOverflowTypes
  11585. }
  11586. if iNdEx >= l {
  11587. return io.ErrUnexpectedEOF
  11588. }
  11589. b := dAtA[iNdEx]
  11590. iNdEx++
  11591. packedLen |= int(b&0x7F) << shift
  11592. if b < 0x80 {
  11593. break
  11594. }
  11595. }
  11596. if packedLen < 0 {
  11597. return ErrInvalidLengthTypes
  11598. }
  11599. postIndex := iNdEx + packedLen
  11600. if postIndex < 0 {
  11601. return ErrInvalidLengthTypes
  11602. }
  11603. if postIndex > l {
  11604. return io.ErrUnexpectedEOF
  11605. }
  11606. var elementCount int
  11607. var count int
  11608. for _, integer := range dAtA[iNdEx:postIndex] {
  11609. if integer < 128 {
  11610. count++
  11611. }
  11612. }
  11613. elementCount = count
  11614. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11615. m.RefetchChunks = make([]uint32, 0, elementCount)
  11616. }
  11617. for iNdEx < postIndex {
  11618. var v uint32
  11619. for shift := uint(0); ; shift += 7 {
  11620. if shift >= 64 {
  11621. return ErrIntOverflowTypes
  11622. }
  11623. if iNdEx >= l {
  11624. return io.ErrUnexpectedEOF
  11625. }
  11626. b := dAtA[iNdEx]
  11627. iNdEx++
  11628. v |= uint32(b&0x7F) << shift
  11629. if b < 0x80 {
  11630. break
  11631. }
  11632. }
  11633. m.RefetchChunks = append(m.RefetchChunks, v)
  11634. }
  11635. } else {
  11636. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11637. }
  11638. case 3:
  11639. if wireType != 2 {
  11640. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11641. }
  11642. var stringLen uint64
  11643. for shift := uint(0); ; shift += 7 {
  11644. if shift >= 64 {
  11645. return ErrIntOverflowTypes
  11646. }
  11647. if iNdEx >= l {
  11648. return io.ErrUnexpectedEOF
  11649. }
  11650. b := dAtA[iNdEx]
  11651. iNdEx++
  11652. stringLen |= uint64(b&0x7F) << shift
  11653. if b < 0x80 {
  11654. break
  11655. }
  11656. }
  11657. intStringLen := int(stringLen)
  11658. if intStringLen < 0 {
  11659. return ErrInvalidLengthTypes
  11660. }
  11661. postIndex := iNdEx + intStringLen
  11662. if postIndex < 0 {
  11663. return ErrInvalidLengthTypes
  11664. }
  11665. if postIndex > l {
  11666. return io.ErrUnexpectedEOF
  11667. }
  11668. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11669. iNdEx = postIndex
  11670. default:
  11671. iNdEx = preIndex
  11672. skippy, err := skipTypes(dAtA[iNdEx:])
  11673. if err != nil {
  11674. return err
  11675. }
  11676. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11677. return ErrInvalidLengthTypes
  11678. }
  11679. if (iNdEx + skippy) > l {
  11680. return io.ErrUnexpectedEOF
  11681. }
  11682. iNdEx += skippy
  11683. }
  11684. }
  11685. if iNdEx > l {
  11686. return io.ErrUnexpectedEOF
  11687. }
  11688. return nil
  11689. }
  11690. func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
  11691. l := len(dAtA)
  11692. iNdEx := 0
  11693. for iNdEx < l {
  11694. preIndex := iNdEx
  11695. var wire uint64
  11696. for shift := uint(0); ; shift += 7 {
  11697. if shift >= 64 {
  11698. return ErrIntOverflowTypes
  11699. }
  11700. if iNdEx >= l {
  11701. return io.ErrUnexpectedEOF
  11702. }
  11703. b := dAtA[iNdEx]
  11704. iNdEx++
  11705. wire |= uint64(b&0x7F) << shift
  11706. if b < 0x80 {
  11707. break
  11708. }
  11709. }
  11710. fieldNum := int32(wire >> 3)
  11711. wireType := int(wire & 0x7)
  11712. if wireType == 4 {
  11713. return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group")
  11714. }
  11715. if fieldNum <= 0 {
  11716. return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
  11717. }
  11718. switch fieldNum {
  11719. case 1:
  11720. if wireType != 2 {
  11721. return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  11722. }
  11723. var msglen int
  11724. for shift := uint(0); ; shift += 7 {
  11725. if shift >= 64 {
  11726. return ErrIntOverflowTypes
  11727. }
  11728. if iNdEx >= l {
  11729. return io.ErrUnexpectedEOF
  11730. }
  11731. b := dAtA[iNdEx]
  11732. iNdEx++
  11733. msglen |= int(b&0x7F) << shift
  11734. if b < 0x80 {
  11735. break
  11736. }
  11737. }
  11738. if msglen < 0 {
  11739. return ErrInvalidLengthTypes
  11740. }
  11741. postIndex := iNdEx + msglen
  11742. if postIndex < 0 {
  11743. return ErrInvalidLengthTypes
  11744. }
  11745. if postIndex > l {
  11746. return io.ErrUnexpectedEOF
  11747. }
  11748. if m.Block == nil {
  11749. m.Block = &BlockParams{}
  11750. }
  11751. if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11752. return err
  11753. }
  11754. iNdEx = postIndex
  11755. case 2:
  11756. if wireType != 2 {
  11757. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  11758. }
  11759. var msglen int
  11760. for shift := uint(0); ; shift += 7 {
  11761. if shift >= 64 {
  11762. return ErrIntOverflowTypes
  11763. }
  11764. if iNdEx >= l {
  11765. return io.ErrUnexpectedEOF
  11766. }
  11767. b := dAtA[iNdEx]
  11768. iNdEx++
  11769. msglen |= int(b&0x7F) << shift
  11770. if b < 0x80 {
  11771. break
  11772. }
  11773. }
  11774. if msglen < 0 {
  11775. return ErrInvalidLengthTypes
  11776. }
  11777. postIndex := iNdEx + msglen
  11778. if postIndex < 0 {
  11779. return ErrInvalidLengthTypes
  11780. }
  11781. if postIndex > l {
  11782. return io.ErrUnexpectedEOF
  11783. }
  11784. if m.Evidence == nil {
  11785. m.Evidence = &types1.EvidenceParams{}
  11786. }
  11787. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11788. return err
  11789. }
  11790. iNdEx = postIndex
  11791. case 3:
  11792. if wireType != 2 {
  11793. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  11794. }
  11795. var msglen int
  11796. for shift := uint(0); ; shift += 7 {
  11797. if shift >= 64 {
  11798. return ErrIntOverflowTypes
  11799. }
  11800. if iNdEx >= l {
  11801. return io.ErrUnexpectedEOF
  11802. }
  11803. b := dAtA[iNdEx]
  11804. iNdEx++
  11805. msglen |= int(b&0x7F) << shift
  11806. if b < 0x80 {
  11807. break
  11808. }
  11809. }
  11810. if msglen < 0 {
  11811. return ErrInvalidLengthTypes
  11812. }
  11813. postIndex := iNdEx + msglen
  11814. if postIndex < 0 {
  11815. return ErrInvalidLengthTypes
  11816. }
  11817. if postIndex > l {
  11818. return io.ErrUnexpectedEOF
  11819. }
  11820. if m.Validator == nil {
  11821. m.Validator = &types1.ValidatorParams{}
  11822. }
  11823. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11824. return err
  11825. }
  11826. iNdEx = postIndex
  11827. case 4:
  11828. if wireType != 2 {
  11829. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  11830. }
  11831. var msglen int
  11832. for shift := uint(0); ; shift += 7 {
  11833. if shift >= 64 {
  11834. return ErrIntOverflowTypes
  11835. }
  11836. if iNdEx >= l {
  11837. return io.ErrUnexpectedEOF
  11838. }
  11839. b := dAtA[iNdEx]
  11840. iNdEx++
  11841. msglen |= int(b&0x7F) << shift
  11842. if b < 0x80 {
  11843. break
  11844. }
  11845. }
  11846. if msglen < 0 {
  11847. return ErrInvalidLengthTypes
  11848. }
  11849. postIndex := iNdEx + msglen
  11850. if postIndex < 0 {
  11851. return ErrInvalidLengthTypes
  11852. }
  11853. if postIndex > l {
  11854. return io.ErrUnexpectedEOF
  11855. }
  11856. if m.Version == nil {
  11857. m.Version = &types1.VersionParams{}
  11858. }
  11859. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11860. return err
  11861. }
  11862. iNdEx = postIndex
  11863. default:
  11864. iNdEx = preIndex
  11865. skippy, err := skipTypes(dAtA[iNdEx:])
  11866. if err != nil {
  11867. return err
  11868. }
  11869. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11870. return ErrInvalidLengthTypes
  11871. }
  11872. if (iNdEx + skippy) > l {
  11873. return io.ErrUnexpectedEOF
  11874. }
  11875. iNdEx += skippy
  11876. }
  11877. }
  11878. if iNdEx > l {
  11879. return io.ErrUnexpectedEOF
  11880. }
  11881. return nil
  11882. }
  11883. func (m *BlockParams) Unmarshal(dAtA []byte) error {
  11884. l := len(dAtA)
  11885. iNdEx := 0
  11886. for iNdEx < l {
  11887. preIndex := iNdEx
  11888. var wire uint64
  11889. for shift := uint(0); ; shift += 7 {
  11890. if shift >= 64 {
  11891. return ErrIntOverflowTypes
  11892. }
  11893. if iNdEx >= l {
  11894. return io.ErrUnexpectedEOF
  11895. }
  11896. b := dAtA[iNdEx]
  11897. iNdEx++
  11898. wire |= uint64(b&0x7F) << shift
  11899. if b < 0x80 {
  11900. break
  11901. }
  11902. }
  11903. fieldNum := int32(wire >> 3)
  11904. wireType := int(wire & 0x7)
  11905. if wireType == 4 {
  11906. return fmt.Errorf("proto: BlockParams: wiretype end group for non-group")
  11907. }
  11908. if fieldNum <= 0 {
  11909. return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
  11910. }
  11911. switch fieldNum {
  11912. case 1:
  11913. if wireType != 0 {
  11914. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  11915. }
  11916. m.MaxBytes = 0
  11917. for shift := uint(0); ; shift += 7 {
  11918. if shift >= 64 {
  11919. return ErrIntOverflowTypes
  11920. }
  11921. if iNdEx >= l {
  11922. return io.ErrUnexpectedEOF
  11923. }
  11924. b := dAtA[iNdEx]
  11925. iNdEx++
  11926. m.MaxBytes |= int64(b&0x7F) << shift
  11927. if b < 0x80 {
  11928. break
  11929. }
  11930. }
  11931. case 2:
  11932. if wireType != 0 {
  11933. return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
  11934. }
  11935. m.MaxGas = 0
  11936. for shift := uint(0); ; shift += 7 {
  11937. if shift >= 64 {
  11938. return ErrIntOverflowTypes
  11939. }
  11940. if iNdEx >= l {
  11941. return io.ErrUnexpectedEOF
  11942. }
  11943. b := dAtA[iNdEx]
  11944. iNdEx++
  11945. m.MaxGas |= int64(b&0x7F) << shift
  11946. if b < 0x80 {
  11947. break
  11948. }
  11949. }
  11950. default:
  11951. iNdEx = preIndex
  11952. skippy, err := skipTypes(dAtA[iNdEx:])
  11953. if err != nil {
  11954. return err
  11955. }
  11956. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11957. return ErrInvalidLengthTypes
  11958. }
  11959. if (iNdEx + skippy) > l {
  11960. return io.ErrUnexpectedEOF
  11961. }
  11962. iNdEx += skippy
  11963. }
  11964. }
  11965. if iNdEx > l {
  11966. return io.ErrUnexpectedEOF
  11967. }
  11968. return nil
  11969. }
  11970. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  11971. l := len(dAtA)
  11972. iNdEx := 0
  11973. for iNdEx < l {
  11974. preIndex := iNdEx
  11975. var wire uint64
  11976. for shift := uint(0); ; shift += 7 {
  11977. if shift >= 64 {
  11978. return ErrIntOverflowTypes
  11979. }
  11980. if iNdEx >= l {
  11981. return io.ErrUnexpectedEOF
  11982. }
  11983. b := dAtA[iNdEx]
  11984. iNdEx++
  11985. wire |= uint64(b&0x7F) << shift
  11986. if b < 0x80 {
  11987. break
  11988. }
  11989. }
  11990. fieldNum := int32(wire >> 3)
  11991. wireType := int(wire & 0x7)
  11992. if wireType == 4 {
  11993. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  11994. }
  11995. if fieldNum <= 0 {
  11996. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  11997. }
  11998. switch fieldNum {
  11999. case 1:
  12000. if wireType != 0 {
  12001. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  12002. }
  12003. m.Round = 0
  12004. for shift := uint(0); ; shift += 7 {
  12005. if shift >= 64 {
  12006. return ErrIntOverflowTypes
  12007. }
  12008. if iNdEx >= l {
  12009. return io.ErrUnexpectedEOF
  12010. }
  12011. b := dAtA[iNdEx]
  12012. iNdEx++
  12013. m.Round |= int32(b&0x7F) << shift
  12014. if b < 0x80 {
  12015. break
  12016. }
  12017. }
  12018. case 2:
  12019. if wireType != 2 {
  12020. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  12021. }
  12022. var msglen int
  12023. for shift := uint(0); ; shift += 7 {
  12024. if shift >= 64 {
  12025. return ErrIntOverflowTypes
  12026. }
  12027. if iNdEx >= l {
  12028. return io.ErrUnexpectedEOF
  12029. }
  12030. b := dAtA[iNdEx]
  12031. iNdEx++
  12032. msglen |= int(b&0x7F) << shift
  12033. if b < 0x80 {
  12034. break
  12035. }
  12036. }
  12037. if msglen < 0 {
  12038. return ErrInvalidLengthTypes
  12039. }
  12040. postIndex := iNdEx + msglen
  12041. if postIndex < 0 {
  12042. return ErrInvalidLengthTypes
  12043. }
  12044. if postIndex > l {
  12045. return io.ErrUnexpectedEOF
  12046. }
  12047. m.Votes = append(m.Votes, VoteInfo{})
  12048. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12049. return err
  12050. }
  12051. iNdEx = postIndex
  12052. default:
  12053. iNdEx = preIndex
  12054. skippy, err := skipTypes(dAtA[iNdEx:])
  12055. if err != nil {
  12056. return err
  12057. }
  12058. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12059. return ErrInvalidLengthTypes
  12060. }
  12061. if (iNdEx + skippy) > l {
  12062. return io.ErrUnexpectedEOF
  12063. }
  12064. iNdEx += skippy
  12065. }
  12066. }
  12067. if iNdEx > l {
  12068. return io.ErrUnexpectedEOF
  12069. }
  12070. return nil
  12071. }
  12072. func (m *Event) Unmarshal(dAtA []byte) error {
  12073. l := len(dAtA)
  12074. iNdEx := 0
  12075. for iNdEx < l {
  12076. preIndex := iNdEx
  12077. var wire uint64
  12078. for shift := uint(0); ; shift += 7 {
  12079. if shift >= 64 {
  12080. return ErrIntOverflowTypes
  12081. }
  12082. if iNdEx >= l {
  12083. return io.ErrUnexpectedEOF
  12084. }
  12085. b := dAtA[iNdEx]
  12086. iNdEx++
  12087. wire |= uint64(b&0x7F) << shift
  12088. if b < 0x80 {
  12089. break
  12090. }
  12091. }
  12092. fieldNum := int32(wire >> 3)
  12093. wireType := int(wire & 0x7)
  12094. if wireType == 4 {
  12095. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  12096. }
  12097. if fieldNum <= 0 {
  12098. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  12099. }
  12100. switch fieldNum {
  12101. case 1:
  12102. if wireType != 2 {
  12103. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12104. }
  12105. var stringLen uint64
  12106. for shift := uint(0); ; shift += 7 {
  12107. if shift >= 64 {
  12108. return ErrIntOverflowTypes
  12109. }
  12110. if iNdEx >= l {
  12111. return io.ErrUnexpectedEOF
  12112. }
  12113. b := dAtA[iNdEx]
  12114. iNdEx++
  12115. stringLen |= uint64(b&0x7F) << shift
  12116. if b < 0x80 {
  12117. break
  12118. }
  12119. }
  12120. intStringLen := int(stringLen)
  12121. if intStringLen < 0 {
  12122. return ErrInvalidLengthTypes
  12123. }
  12124. postIndex := iNdEx + intStringLen
  12125. if postIndex < 0 {
  12126. return ErrInvalidLengthTypes
  12127. }
  12128. if postIndex > l {
  12129. return io.ErrUnexpectedEOF
  12130. }
  12131. m.Type = string(dAtA[iNdEx:postIndex])
  12132. iNdEx = postIndex
  12133. case 2:
  12134. if wireType != 2 {
  12135. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  12136. }
  12137. var msglen int
  12138. for shift := uint(0); ; shift += 7 {
  12139. if shift >= 64 {
  12140. return ErrIntOverflowTypes
  12141. }
  12142. if iNdEx >= l {
  12143. return io.ErrUnexpectedEOF
  12144. }
  12145. b := dAtA[iNdEx]
  12146. iNdEx++
  12147. msglen |= int(b&0x7F) << shift
  12148. if b < 0x80 {
  12149. break
  12150. }
  12151. }
  12152. if msglen < 0 {
  12153. return ErrInvalidLengthTypes
  12154. }
  12155. postIndex := iNdEx + msglen
  12156. if postIndex < 0 {
  12157. return ErrInvalidLengthTypes
  12158. }
  12159. if postIndex > l {
  12160. return io.ErrUnexpectedEOF
  12161. }
  12162. m.Attributes = append(m.Attributes, EventAttribute{})
  12163. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12164. return err
  12165. }
  12166. iNdEx = postIndex
  12167. default:
  12168. iNdEx = preIndex
  12169. skippy, err := skipTypes(dAtA[iNdEx:])
  12170. if err != nil {
  12171. return err
  12172. }
  12173. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12174. return ErrInvalidLengthTypes
  12175. }
  12176. if (iNdEx + skippy) > l {
  12177. return io.ErrUnexpectedEOF
  12178. }
  12179. iNdEx += skippy
  12180. }
  12181. }
  12182. if iNdEx > l {
  12183. return io.ErrUnexpectedEOF
  12184. }
  12185. return nil
  12186. }
  12187. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  12188. l := len(dAtA)
  12189. iNdEx := 0
  12190. for iNdEx < l {
  12191. preIndex := iNdEx
  12192. var wire uint64
  12193. for shift := uint(0); ; shift += 7 {
  12194. if shift >= 64 {
  12195. return ErrIntOverflowTypes
  12196. }
  12197. if iNdEx >= l {
  12198. return io.ErrUnexpectedEOF
  12199. }
  12200. b := dAtA[iNdEx]
  12201. iNdEx++
  12202. wire |= uint64(b&0x7F) << shift
  12203. if b < 0x80 {
  12204. break
  12205. }
  12206. }
  12207. fieldNum := int32(wire >> 3)
  12208. wireType := int(wire & 0x7)
  12209. if wireType == 4 {
  12210. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  12211. }
  12212. if fieldNum <= 0 {
  12213. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  12214. }
  12215. switch fieldNum {
  12216. case 1:
  12217. if wireType != 2 {
  12218. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  12219. }
  12220. var byteLen int
  12221. for shift := uint(0); ; shift += 7 {
  12222. if shift >= 64 {
  12223. return ErrIntOverflowTypes
  12224. }
  12225. if iNdEx >= l {
  12226. return io.ErrUnexpectedEOF
  12227. }
  12228. b := dAtA[iNdEx]
  12229. iNdEx++
  12230. byteLen |= int(b&0x7F) << shift
  12231. if b < 0x80 {
  12232. break
  12233. }
  12234. }
  12235. if byteLen < 0 {
  12236. return ErrInvalidLengthTypes
  12237. }
  12238. postIndex := iNdEx + byteLen
  12239. if postIndex < 0 {
  12240. return ErrInvalidLengthTypes
  12241. }
  12242. if postIndex > l {
  12243. return io.ErrUnexpectedEOF
  12244. }
  12245. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  12246. if m.Key == nil {
  12247. m.Key = []byte{}
  12248. }
  12249. iNdEx = postIndex
  12250. case 2:
  12251. if wireType != 2 {
  12252. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  12253. }
  12254. var byteLen int
  12255. for shift := uint(0); ; shift += 7 {
  12256. if shift >= 64 {
  12257. return ErrIntOverflowTypes
  12258. }
  12259. if iNdEx >= l {
  12260. return io.ErrUnexpectedEOF
  12261. }
  12262. b := dAtA[iNdEx]
  12263. iNdEx++
  12264. byteLen |= int(b&0x7F) << shift
  12265. if b < 0x80 {
  12266. break
  12267. }
  12268. }
  12269. if byteLen < 0 {
  12270. return ErrInvalidLengthTypes
  12271. }
  12272. postIndex := iNdEx + byteLen
  12273. if postIndex < 0 {
  12274. return ErrInvalidLengthTypes
  12275. }
  12276. if postIndex > l {
  12277. return io.ErrUnexpectedEOF
  12278. }
  12279. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  12280. if m.Value == nil {
  12281. m.Value = []byte{}
  12282. }
  12283. iNdEx = postIndex
  12284. case 3:
  12285. if wireType != 0 {
  12286. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12287. }
  12288. var v int
  12289. for shift := uint(0); ; shift += 7 {
  12290. if shift >= 64 {
  12291. return ErrIntOverflowTypes
  12292. }
  12293. if iNdEx >= l {
  12294. return io.ErrUnexpectedEOF
  12295. }
  12296. b := dAtA[iNdEx]
  12297. iNdEx++
  12298. v |= int(b&0x7F) << shift
  12299. if b < 0x80 {
  12300. break
  12301. }
  12302. }
  12303. m.Index = bool(v != 0)
  12304. default:
  12305. iNdEx = preIndex
  12306. skippy, err := skipTypes(dAtA[iNdEx:])
  12307. if err != nil {
  12308. return err
  12309. }
  12310. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12311. return ErrInvalidLengthTypes
  12312. }
  12313. if (iNdEx + skippy) > l {
  12314. return io.ErrUnexpectedEOF
  12315. }
  12316. iNdEx += skippy
  12317. }
  12318. }
  12319. if iNdEx > l {
  12320. return io.ErrUnexpectedEOF
  12321. }
  12322. return nil
  12323. }
  12324. func (m *TxResult) Unmarshal(dAtA []byte) error {
  12325. l := len(dAtA)
  12326. iNdEx := 0
  12327. for iNdEx < l {
  12328. preIndex := iNdEx
  12329. var wire uint64
  12330. for shift := uint(0); ; shift += 7 {
  12331. if shift >= 64 {
  12332. return ErrIntOverflowTypes
  12333. }
  12334. if iNdEx >= l {
  12335. return io.ErrUnexpectedEOF
  12336. }
  12337. b := dAtA[iNdEx]
  12338. iNdEx++
  12339. wire |= uint64(b&0x7F) << shift
  12340. if b < 0x80 {
  12341. break
  12342. }
  12343. }
  12344. fieldNum := int32(wire >> 3)
  12345. wireType := int(wire & 0x7)
  12346. if wireType == 4 {
  12347. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  12348. }
  12349. if fieldNum <= 0 {
  12350. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  12351. }
  12352. switch fieldNum {
  12353. case 1:
  12354. if wireType != 0 {
  12355. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12356. }
  12357. m.Height = 0
  12358. for shift := uint(0); ; shift += 7 {
  12359. if shift >= 64 {
  12360. return ErrIntOverflowTypes
  12361. }
  12362. if iNdEx >= l {
  12363. return io.ErrUnexpectedEOF
  12364. }
  12365. b := dAtA[iNdEx]
  12366. iNdEx++
  12367. m.Height |= int64(b&0x7F) << shift
  12368. if b < 0x80 {
  12369. break
  12370. }
  12371. }
  12372. case 2:
  12373. if wireType != 0 {
  12374. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12375. }
  12376. m.Index = 0
  12377. for shift := uint(0); ; shift += 7 {
  12378. if shift >= 64 {
  12379. return ErrIntOverflowTypes
  12380. }
  12381. if iNdEx >= l {
  12382. return io.ErrUnexpectedEOF
  12383. }
  12384. b := dAtA[iNdEx]
  12385. iNdEx++
  12386. m.Index |= uint32(b&0x7F) << shift
  12387. if b < 0x80 {
  12388. break
  12389. }
  12390. }
  12391. case 3:
  12392. if wireType != 2 {
  12393. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  12394. }
  12395. var byteLen int
  12396. for shift := uint(0); ; shift += 7 {
  12397. if shift >= 64 {
  12398. return ErrIntOverflowTypes
  12399. }
  12400. if iNdEx >= l {
  12401. return io.ErrUnexpectedEOF
  12402. }
  12403. b := dAtA[iNdEx]
  12404. iNdEx++
  12405. byteLen |= int(b&0x7F) << shift
  12406. if b < 0x80 {
  12407. break
  12408. }
  12409. }
  12410. if byteLen < 0 {
  12411. return ErrInvalidLengthTypes
  12412. }
  12413. postIndex := iNdEx + byteLen
  12414. if postIndex < 0 {
  12415. return ErrInvalidLengthTypes
  12416. }
  12417. if postIndex > l {
  12418. return io.ErrUnexpectedEOF
  12419. }
  12420. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  12421. if m.Tx == nil {
  12422. m.Tx = []byte{}
  12423. }
  12424. iNdEx = postIndex
  12425. case 4:
  12426. if wireType != 2 {
  12427. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12428. }
  12429. var msglen int
  12430. for shift := uint(0); ; shift += 7 {
  12431. if shift >= 64 {
  12432. return ErrIntOverflowTypes
  12433. }
  12434. if iNdEx >= l {
  12435. return io.ErrUnexpectedEOF
  12436. }
  12437. b := dAtA[iNdEx]
  12438. iNdEx++
  12439. msglen |= int(b&0x7F) << shift
  12440. if b < 0x80 {
  12441. break
  12442. }
  12443. }
  12444. if msglen < 0 {
  12445. return ErrInvalidLengthTypes
  12446. }
  12447. postIndex := iNdEx + msglen
  12448. if postIndex < 0 {
  12449. return ErrInvalidLengthTypes
  12450. }
  12451. if postIndex > l {
  12452. return io.ErrUnexpectedEOF
  12453. }
  12454. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12455. return err
  12456. }
  12457. iNdEx = postIndex
  12458. default:
  12459. iNdEx = preIndex
  12460. skippy, err := skipTypes(dAtA[iNdEx:])
  12461. if err != nil {
  12462. return err
  12463. }
  12464. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12465. return ErrInvalidLengthTypes
  12466. }
  12467. if (iNdEx + skippy) > l {
  12468. return io.ErrUnexpectedEOF
  12469. }
  12470. iNdEx += skippy
  12471. }
  12472. }
  12473. if iNdEx > l {
  12474. return io.ErrUnexpectedEOF
  12475. }
  12476. return nil
  12477. }
  12478. func (m *Validator) Unmarshal(dAtA []byte) error {
  12479. l := len(dAtA)
  12480. iNdEx := 0
  12481. for iNdEx < l {
  12482. preIndex := iNdEx
  12483. var wire uint64
  12484. for shift := uint(0); ; shift += 7 {
  12485. if shift >= 64 {
  12486. return ErrIntOverflowTypes
  12487. }
  12488. if iNdEx >= l {
  12489. return io.ErrUnexpectedEOF
  12490. }
  12491. b := dAtA[iNdEx]
  12492. iNdEx++
  12493. wire |= uint64(b&0x7F) << shift
  12494. if b < 0x80 {
  12495. break
  12496. }
  12497. }
  12498. fieldNum := int32(wire >> 3)
  12499. wireType := int(wire & 0x7)
  12500. if wireType == 4 {
  12501. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  12502. }
  12503. if fieldNum <= 0 {
  12504. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  12505. }
  12506. switch fieldNum {
  12507. case 1:
  12508. if wireType != 2 {
  12509. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  12510. }
  12511. var byteLen int
  12512. for shift := uint(0); ; shift += 7 {
  12513. if shift >= 64 {
  12514. return ErrIntOverflowTypes
  12515. }
  12516. if iNdEx >= l {
  12517. return io.ErrUnexpectedEOF
  12518. }
  12519. b := dAtA[iNdEx]
  12520. iNdEx++
  12521. byteLen |= int(b&0x7F) << shift
  12522. if b < 0x80 {
  12523. break
  12524. }
  12525. }
  12526. if byteLen < 0 {
  12527. return ErrInvalidLengthTypes
  12528. }
  12529. postIndex := iNdEx + byteLen
  12530. if postIndex < 0 {
  12531. return ErrInvalidLengthTypes
  12532. }
  12533. if postIndex > l {
  12534. return io.ErrUnexpectedEOF
  12535. }
  12536. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  12537. if m.Address == nil {
  12538. m.Address = []byte{}
  12539. }
  12540. iNdEx = postIndex
  12541. case 3:
  12542. if wireType != 0 {
  12543. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12544. }
  12545. m.Power = 0
  12546. for shift := uint(0); ; shift += 7 {
  12547. if shift >= 64 {
  12548. return ErrIntOverflowTypes
  12549. }
  12550. if iNdEx >= l {
  12551. return io.ErrUnexpectedEOF
  12552. }
  12553. b := dAtA[iNdEx]
  12554. iNdEx++
  12555. m.Power |= int64(b&0x7F) << shift
  12556. if b < 0x80 {
  12557. break
  12558. }
  12559. }
  12560. default:
  12561. iNdEx = preIndex
  12562. skippy, err := skipTypes(dAtA[iNdEx:])
  12563. if err != nil {
  12564. return err
  12565. }
  12566. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12567. return ErrInvalidLengthTypes
  12568. }
  12569. if (iNdEx + skippy) > l {
  12570. return io.ErrUnexpectedEOF
  12571. }
  12572. iNdEx += skippy
  12573. }
  12574. }
  12575. if iNdEx > l {
  12576. return io.ErrUnexpectedEOF
  12577. }
  12578. return nil
  12579. }
  12580. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12581. l := len(dAtA)
  12582. iNdEx := 0
  12583. for iNdEx < l {
  12584. preIndex := iNdEx
  12585. var wire uint64
  12586. for shift := uint(0); ; shift += 7 {
  12587. if shift >= 64 {
  12588. return ErrIntOverflowTypes
  12589. }
  12590. if iNdEx >= l {
  12591. return io.ErrUnexpectedEOF
  12592. }
  12593. b := dAtA[iNdEx]
  12594. iNdEx++
  12595. wire |= uint64(b&0x7F) << shift
  12596. if b < 0x80 {
  12597. break
  12598. }
  12599. }
  12600. fieldNum := int32(wire >> 3)
  12601. wireType := int(wire & 0x7)
  12602. if wireType == 4 {
  12603. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12604. }
  12605. if fieldNum <= 0 {
  12606. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12607. }
  12608. switch fieldNum {
  12609. case 1:
  12610. if wireType != 2 {
  12611. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12612. }
  12613. var msglen int
  12614. for shift := uint(0); ; shift += 7 {
  12615. if shift >= 64 {
  12616. return ErrIntOverflowTypes
  12617. }
  12618. if iNdEx >= l {
  12619. return io.ErrUnexpectedEOF
  12620. }
  12621. b := dAtA[iNdEx]
  12622. iNdEx++
  12623. msglen |= int(b&0x7F) << shift
  12624. if b < 0x80 {
  12625. break
  12626. }
  12627. }
  12628. if msglen < 0 {
  12629. return ErrInvalidLengthTypes
  12630. }
  12631. postIndex := iNdEx + msglen
  12632. if postIndex < 0 {
  12633. return ErrInvalidLengthTypes
  12634. }
  12635. if postIndex > l {
  12636. return io.ErrUnexpectedEOF
  12637. }
  12638. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12639. return err
  12640. }
  12641. iNdEx = postIndex
  12642. case 2:
  12643. if wireType != 0 {
  12644. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12645. }
  12646. m.Power = 0
  12647. for shift := uint(0); ; shift += 7 {
  12648. if shift >= 64 {
  12649. return ErrIntOverflowTypes
  12650. }
  12651. if iNdEx >= l {
  12652. return io.ErrUnexpectedEOF
  12653. }
  12654. b := dAtA[iNdEx]
  12655. iNdEx++
  12656. m.Power |= int64(b&0x7F) << shift
  12657. if b < 0x80 {
  12658. break
  12659. }
  12660. }
  12661. default:
  12662. iNdEx = preIndex
  12663. skippy, err := skipTypes(dAtA[iNdEx:])
  12664. if err != nil {
  12665. return err
  12666. }
  12667. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12668. return ErrInvalidLengthTypes
  12669. }
  12670. if (iNdEx + skippy) > l {
  12671. return io.ErrUnexpectedEOF
  12672. }
  12673. iNdEx += skippy
  12674. }
  12675. }
  12676. if iNdEx > l {
  12677. return io.ErrUnexpectedEOF
  12678. }
  12679. return nil
  12680. }
  12681. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12682. l := len(dAtA)
  12683. iNdEx := 0
  12684. for iNdEx < l {
  12685. preIndex := iNdEx
  12686. var wire uint64
  12687. for shift := uint(0); ; shift += 7 {
  12688. if shift >= 64 {
  12689. return ErrIntOverflowTypes
  12690. }
  12691. if iNdEx >= l {
  12692. return io.ErrUnexpectedEOF
  12693. }
  12694. b := dAtA[iNdEx]
  12695. iNdEx++
  12696. wire |= uint64(b&0x7F) << shift
  12697. if b < 0x80 {
  12698. break
  12699. }
  12700. }
  12701. fieldNum := int32(wire >> 3)
  12702. wireType := int(wire & 0x7)
  12703. if wireType == 4 {
  12704. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12705. }
  12706. if fieldNum <= 0 {
  12707. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12708. }
  12709. switch fieldNum {
  12710. case 1:
  12711. if wireType != 2 {
  12712. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12713. }
  12714. var msglen int
  12715. for shift := uint(0); ; shift += 7 {
  12716. if shift >= 64 {
  12717. return ErrIntOverflowTypes
  12718. }
  12719. if iNdEx >= l {
  12720. return io.ErrUnexpectedEOF
  12721. }
  12722. b := dAtA[iNdEx]
  12723. iNdEx++
  12724. msglen |= int(b&0x7F) << shift
  12725. if b < 0x80 {
  12726. break
  12727. }
  12728. }
  12729. if msglen < 0 {
  12730. return ErrInvalidLengthTypes
  12731. }
  12732. postIndex := iNdEx + msglen
  12733. if postIndex < 0 {
  12734. return ErrInvalidLengthTypes
  12735. }
  12736. if postIndex > l {
  12737. return io.ErrUnexpectedEOF
  12738. }
  12739. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12740. return err
  12741. }
  12742. iNdEx = postIndex
  12743. case 2:
  12744. if wireType != 0 {
  12745. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12746. }
  12747. var v int
  12748. for shift := uint(0); ; shift += 7 {
  12749. if shift >= 64 {
  12750. return ErrIntOverflowTypes
  12751. }
  12752. if iNdEx >= l {
  12753. return io.ErrUnexpectedEOF
  12754. }
  12755. b := dAtA[iNdEx]
  12756. iNdEx++
  12757. v |= int(b&0x7F) << shift
  12758. if b < 0x80 {
  12759. break
  12760. }
  12761. }
  12762. m.SignedLastBlock = bool(v != 0)
  12763. default:
  12764. iNdEx = preIndex
  12765. skippy, err := skipTypes(dAtA[iNdEx:])
  12766. if err != nil {
  12767. return err
  12768. }
  12769. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12770. return ErrInvalidLengthTypes
  12771. }
  12772. if (iNdEx + skippy) > l {
  12773. return io.ErrUnexpectedEOF
  12774. }
  12775. iNdEx += skippy
  12776. }
  12777. }
  12778. if iNdEx > l {
  12779. return io.ErrUnexpectedEOF
  12780. }
  12781. return nil
  12782. }
  12783. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12784. l := len(dAtA)
  12785. iNdEx := 0
  12786. for iNdEx < l {
  12787. preIndex := iNdEx
  12788. var wire uint64
  12789. for shift := uint(0); ; shift += 7 {
  12790. if shift >= 64 {
  12791. return ErrIntOverflowTypes
  12792. }
  12793. if iNdEx >= l {
  12794. return io.ErrUnexpectedEOF
  12795. }
  12796. b := dAtA[iNdEx]
  12797. iNdEx++
  12798. wire |= uint64(b&0x7F) << shift
  12799. if b < 0x80 {
  12800. break
  12801. }
  12802. }
  12803. fieldNum := int32(wire >> 3)
  12804. wireType := int(wire & 0x7)
  12805. if wireType == 4 {
  12806. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12807. }
  12808. if fieldNum <= 0 {
  12809. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12810. }
  12811. switch fieldNum {
  12812. case 1:
  12813. if wireType != 0 {
  12814. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12815. }
  12816. m.Type = 0
  12817. for shift := uint(0); ; shift += 7 {
  12818. if shift >= 64 {
  12819. return ErrIntOverflowTypes
  12820. }
  12821. if iNdEx >= l {
  12822. return io.ErrUnexpectedEOF
  12823. }
  12824. b := dAtA[iNdEx]
  12825. iNdEx++
  12826. m.Type |= EvidenceType(b&0x7F) << shift
  12827. if b < 0x80 {
  12828. break
  12829. }
  12830. }
  12831. case 2:
  12832. if wireType != 2 {
  12833. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12834. }
  12835. var msglen int
  12836. for shift := uint(0); ; shift += 7 {
  12837. if shift >= 64 {
  12838. return ErrIntOverflowTypes
  12839. }
  12840. if iNdEx >= l {
  12841. return io.ErrUnexpectedEOF
  12842. }
  12843. b := dAtA[iNdEx]
  12844. iNdEx++
  12845. msglen |= int(b&0x7F) << shift
  12846. if b < 0x80 {
  12847. break
  12848. }
  12849. }
  12850. if msglen < 0 {
  12851. return ErrInvalidLengthTypes
  12852. }
  12853. postIndex := iNdEx + msglen
  12854. if postIndex < 0 {
  12855. return ErrInvalidLengthTypes
  12856. }
  12857. if postIndex > l {
  12858. return io.ErrUnexpectedEOF
  12859. }
  12860. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12861. return err
  12862. }
  12863. iNdEx = postIndex
  12864. case 3:
  12865. if wireType != 0 {
  12866. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12867. }
  12868. m.Height = 0
  12869. for shift := uint(0); ; shift += 7 {
  12870. if shift >= 64 {
  12871. return ErrIntOverflowTypes
  12872. }
  12873. if iNdEx >= l {
  12874. return io.ErrUnexpectedEOF
  12875. }
  12876. b := dAtA[iNdEx]
  12877. iNdEx++
  12878. m.Height |= int64(b&0x7F) << shift
  12879. if b < 0x80 {
  12880. break
  12881. }
  12882. }
  12883. case 4:
  12884. if wireType != 2 {
  12885. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  12886. }
  12887. var msglen int
  12888. for shift := uint(0); ; shift += 7 {
  12889. if shift >= 64 {
  12890. return ErrIntOverflowTypes
  12891. }
  12892. if iNdEx >= l {
  12893. return io.ErrUnexpectedEOF
  12894. }
  12895. b := dAtA[iNdEx]
  12896. iNdEx++
  12897. msglen |= int(b&0x7F) << shift
  12898. if b < 0x80 {
  12899. break
  12900. }
  12901. }
  12902. if msglen < 0 {
  12903. return ErrInvalidLengthTypes
  12904. }
  12905. postIndex := iNdEx + msglen
  12906. if postIndex < 0 {
  12907. return ErrInvalidLengthTypes
  12908. }
  12909. if postIndex > l {
  12910. return io.ErrUnexpectedEOF
  12911. }
  12912. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  12913. return err
  12914. }
  12915. iNdEx = postIndex
  12916. case 5:
  12917. if wireType != 0 {
  12918. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  12919. }
  12920. m.TotalVotingPower = 0
  12921. for shift := uint(0); ; shift += 7 {
  12922. if shift >= 64 {
  12923. return ErrIntOverflowTypes
  12924. }
  12925. if iNdEx >= l {
  12926. return io.ErrUnexpectedEOF
  12927. }
  12928. b := dAtA[iNdEx]
  12929. iNdEx++
  12930. m.TotalVotingPower |= int64(b&0x7F) << shift
  12931. if b < 0x80 {
  12932. break
  12933. }
  12934. }
  12935. default:
  12936. iNdEx = preIndex
  12937. skippy, err := skipTypes(dAtA[iNdEx:])
  12938. if err != nil {
  12939. return err
  12940. }
  12941. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12942. return ErrInvalidLengthTypes
  12943. }
  12944. if (iNdEx + skippy) > l {
  12945. return io.ErrUnexpectedEOF
  12946. }
  12947. iNdEx += skippy
  12948. }
  12949. }
  12950. if iNdEx > l {
  12951. return io.ErrUnexpectedEOF
  12952. }
  12953. return nil
  12954. }
  12955. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  12956. l := len(dAtA)
  12957. iNdEx := 0
  12958. for iNdEx < l {
  12959. preIndex := iNdEx
  12960. var wire uint64
  12961. for shift := uint(0); ; shift += 7 {
  12962. if shift >= 64 {
  12963. return ErrIntOverflowTypes
  12964. }
  12965. if iNdEx >= l {
  12966. return io.ErrUnexpectedEOF
  12967. }
  12968. b := dAtA[iNdEx]
  12969. iNdEx++
  12970. wire |= uint64(b&0x7F) << shift
  12971. if b < 0x80 {
  12972. break
  12973. }
  12974. }
  12975. fieldNum := int32(wire >> 3)
  12976. wireType := int(wire & 0x7)
  12977. if wireType == 4 {
  12978. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  12979. }
  12980. if fieldNum <= 0 {
  12981. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  12982. }
  12983. switch fieldNum {
  12984. case 1:
  12985. if wireType != 0 {
  12986. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12987. }
  12988. m.Height = 0
  12989. for shift := uint(0); ; shift += 7 {
  12990. if shift >= 64 {
  12991. return ErrIntOverflowTypes
  12992. }
  12993. if iNdEx >= l {
  12994. return io.ErrUnexpectedEOF
  12995. }
  12996. b := dAtA[iNdEx]
  12997. iNdEx++
  12998. m.Height |= uint64(b&0x7F) << shift
  12999. if b < 0x80 {
  13000. break
  13001. }
  13002. }
  13003. case 2:
  13004. if wireType != 0 {
  13005. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  13006. }
  13007. m.Format = 0
  13008. for shift := uint(0); ; shift += 7 {
  13009. if shift >= 64 {
  13010. return ErrIntOverflowTypes
  13011. }
  13012. if iNdEx >= l {
  13013. return io.ErrUnexpectedEOF
  13014. }
  13015. b := dAtA[iNdEx]
  13016. iNdEx++
  13017. m.Format |= uint32(b&0x7F) << shift
  13018. if b < 0x80 {
  13019. break
  13020. }
  13021. }
  13022. case 3:
  13023. if wireType != 0 {
  13024. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  13025. }
  13026. m.Chunks = 0
  13027. for shift := uint(0); ; shift += 7 {
  13028. if shift >= 64 {
  13029. return ErrIntOverflowTypes
  13030. }
  13031. if iNdEx >= l {
  13032. return io.ErrUnexpectedEOF
  13033. }
  13034. b := dAtA[iNdEx]
  13035. iNdEx++
  13036. m.Chunks |= uint32(b&0x7F) << shift
  13037. if b < 0x80 {
  13038. break
  13039. }
  13040. }
  13041. case 4:
  13042. if wireType != 2 {
  13043. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  13044. }
  13045. var byteLen int
  13046. for shift := uint(0); ; shift += 7 {
  13047. if shift >= 64 {
  13048. return ErrIntOverflowTypes
  13049. }
  13050. if iNdEx >= l {
  13051. return io.ErrUnexpectedEOF
  13052. }
  13053. b := dAtA[iNdEx]
  13054. iNdEx++
  13055. byteLen |= int(b&0x7F) << shift
  13056. if b < 0x80 {
  13057. break
  13058. }
  13059. }
  13060. if byteLen < 0 {
  13061. return ErrInvalidLengthTypes
  13062. }
  13063. postIndex := iNdEx + byteLen
  13064. if postIndex < 0 {
  13065. return ErrInvalidLengthTypes
  13066. }
  13067. if postIndex > l {
  13068. return io.ErrUnexpectedEOF
  13069. }
  13070. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  13071. if m.Hash == nil {
  13072. m.Hash = []byte{}
  13073. }
  13074. iNdEx = postIndex
  13075. case 5:
  13076. if wireType != 2 {
  13077. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  13078. }
  13079. var byteLen int
  13080. for shift := uint(0); ; shift += 7 {
  13081. if shift >= 64 {
  13082. return ErrIntOverflowTypes
  13083. }
  13084. if iNdEx >= l {
  13085. return io.ErrUnexpectedEOF
  13086. }
  13087. b := dAtA[iNdEx]
  13088. iNdEx++
  13089. byteLen |= int(b&0x7F) << shift
  13090. if b < 0x80 {
  13091. break
  13092. }
  13093. }
  13094. if byteLen < 0 {
  13095. return ErrInvalidLengthTypes
  13096. }
  13097. postIndex := iNdEx + byteLen
  13098. if postIndex < 0 {
  13099. return ErrInvalidLengthTypes
  13100. }
  13101. if postIndex > l {
  13102. return io.ErrUnexpectedEOF
  13103. }
  13104. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  13105. if m.Metadata == nil {
  13106. m.Metadata = []byte{}
  13107. }
  13108. iNdEx = postIndex
  13109. default:
  13110. iNdEx = preIndex
  13111. skippy, err := skipTypes(dAtA[iNdEx:])
  13112. if err != nil {
  13113. return err
  13114. }
  13115. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13116. return ErrInvalidLengthTypes
  13117. }
  13118. if (iNdEx + skippy) > l {
  13119. return io.ErrUnexpectedEOF
  13120. }
  13121. iNdEx += skippy
  13122. }
  13123. }
  13124. if iNdEx > l {
  13125. return io.ErrUnexpectedEOF
  13126. }
  13127. return nil
  13128. }
  13129. func skipTypes(dAtA []byte) (n int, err error) {
  13130. l := len(dAtA)
  13131. iNdEx := 0
  13132. depth := 0
  13133. for iNdEx < l {
  13134. var wire uint64
  13135. for shift := uint(0); ; shift += 7 {
  13136. if shift >= 64 {
  13137. return 0, ErrIntOverflowTypes
  13138. }
  13139. if iNdEx >= l {
  13140. return 0, io.ErrUnexpectedEOF
  13141. }
  13142. b := dAtA[iNdEx]
  13143. iNdEx++
  13144. wire |= (uint64(b) & 0x7F) << shift
  13145. if b < 0x80 {
  13146. break
  13147. }
  13148. }
  13149. wireType := int(wire & 0x7)
  13150. switch wireType {
  13151. case 0:
  13152. for shift := uint(0); ; shift += 7 {
  13153. if shift >= 64 {
  13154. return 0, ErrIntOverflowTypes
  13155. }
  13156. if iNdEx >= l {
  13157. return 0, io.ErrUnexpectedEOF
  13158. }
  13159. iNdEx++
  13160. if dAtA[iNdEx-1] < 0x80 {
  13161. break
  13162. }
  13163. }
  13164. case 1:
  13165. iNdEx += 8
  13166. case 2:
  13167. var length int
  13168. for shift := uint(0); ; shift += 7 {
  13169. if shift >= 64 {
  13170. return 0, ErrIntOverflowTypes
  13171. }
  13172. if iNdEx >= l {
  13173. return 0, io.ErrUnexpectedEOF
  13174. }
  13175. b := dAtA[iNdEx]
  13176. iNdEx++
  13177. length |= (int(b) & 0x7F) << shift
  13178. if b < 0x80 {
  13179. break
  13180. }
  13181. }
  13182. if length < 0 {
  13183. return 0, ErrInvalidLengthTypes
  13184. }
  13185. iNdEx += length
  13186. case 3:
  13187. depth++
  13188. case 4:
  13189. if depth == 0 {
  13190. return 0, ErrUnexpectedEndOfGroupTypes
  13191. }
  13192. depth--
  13193. case 5:
  13194. iNdEx += 4
  13195. default:
  13196. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  13197. }
  13198. if iNdEx < 0 {
  13199. return 0, ErrInvalidLengthTypes
  13200. }
  13201. if depth == 0 {
  13202. return iNdEx, nil
  13203. }
  13204. }
  13205. return 0, io.ErrUnexpectedEOF
  13206. }
  13207. var (
  13208. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  13209. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  13210. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  13211. )