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.

14428 lines
344 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
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{30, 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{32, 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_SetOption
  140. // *Request_InitChain
  141. // *Request_Query
  142. // *Request_BeginBlock
  143. // *Request_CheckTx
  144. // *Request_DeliverTx
  145. // *Request_EndBlock
  146. // *Request_Commit
  147. // *Request_ListSnapshots
  148. // *Request_OfferSnapshot
  149. // *Request_LoadSnapshotChunk
  150. // *Request_ApplySnapshotChunk
  151. Value isRequest_Value `protobuf_oneof:"value"`
  152. }
  153. func (m *Request) Reset() { *m = Request{} }
  154. func (m *Request) String() string { return proto.CompactTextString(m) }
  155. func (*Request) ProtoMessage() {}
  156. func (*Request) Descriptor() ([]byte, []int) {
  157. return fileDescriptor_252557cfdd89a31a, []int{0}
  158. }
  159. func (m *Request) XXX_Unmarshal(b []byte) error {
  160. return m.Unmarshal(b)
  161. }
  162. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  163. if deterministic {
  164. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  165. } else {
  166. b = b[:cap(b)]
  167. n, err := m.MarshalToSizedBuffer(b)
  168. if err != nil {
  169. return nil, err
  170. }
  171. return b[:n], nil
  172. }
  173. }
  174. func (m *Request) XXX_Merge(src proto.Message) {
  175. xxx_messageInfo_Request.Merge(m, src)
  176. }
  177. func (m *Request) XXX_Size() int {
  178. return m.Size()
  179. }
  180. func (m *Request) XXX_DiscardUnknown() {
  181. xxx_messageInfo_Request.DiscardUnknown(m)
  182. }
  183. var xxx_messageInfo_Request proto.InternalMessageInfo
  184. type isRequest_Value interface {
  185. isRequest_Value()
  186. MarshalTo([]byte) (int, error)
  187. Size() int
  188. }
  189. type Request_Echo struct {
  190. Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  191. }
  192. type Request_Flush struct {
  193. Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  194. }
  195. type Request_Info struct {
  196. Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"`
  197. }
  198. type Request_SetOption struct {
  199. SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"`
  200. }
  201. type Request_InitChain struct {
  202. InitChain *RequestInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  203. }
  204. type Request_Query struct {
  205. Query *RequestQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
  206. }
  207. type Request_BeginBlock struct {
  208. BeginBlock *RequestBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  209. }
  210. type Request_CheckTx struct {
  211. CheckTx *RequestCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  212. }
  213. type Request_DeliverTx struct {
  214. DeliverTx *RequestDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  215. }
  216. type Request_EndBlock struct {
  217. EndBlock *RequestEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  218. }
  219. type Request_Commit struct {
  220. Commit *RequestCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  221. }
  222. type Request_ListSnapshots struct {
  223. ListSnapshots *RequestListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  224. }
  225. type Request_OfferSnapshot struct {
  226. OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  227. }
  228. type Request_LoadSnapshotChunk struct {
  229. LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  230. }
  231. type Request_ApplySnapshotChunk struct {
  232. ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  233. }
  234. func (*Request_Echo) isRequest_Value() {}
  235. func (*Request_Flush) isRequest_Value() {}
  236. func (*Request_Info) isRequest_Value() {}
  237. func (*Request_SetOption) isRequest_Value() {}
  238. func (*Request_InitChain) isRequest_Value() {}
  239. func (*Request_Query) isRequest_Value() {}
  240. func (*Request_BeginBlock) isRequest_Value() {}
  241. func (*Request_CheckTx) isRequest_Value() {}
  242. func (*Request_DeliverTx) isRequest_Value() {}
  243. func (*Request_EndBlock) isRequest_Value() {}
  244. func (*Request_Commit) isRequest_Value() {}
  245. func (*Request_ListSnapshots) isRequest_Value() {}
  246. func (*Request_OfferSnapshot) isRequest_Value() {}
  247. func (*Request_LoadSnapshotChunk) isRequest_Value() {}
  248. func (*Request_ApplySnapshotChunk) isRequest_Value() {}
  249. func (m *Request) GetValue() isRequest_Value {
  250. if m != nil {
  251. return m.Value
  252. }
  253. return nil
  254. }
  255. func (m *Request) GetEcho() *RequestEcho {
  256. if x, ok := m.GetValue().(*Request_Echo); ok {
  257. return x.Echo
  258. }
  259. return nil
  260. }
  261. func (m *Request) GetFlush() *RequestFlush {
  262. if x, ok := m.GetValue().(*Request_Flush); ok {
  263. return x.Flush
  264. }
  265. return nil
  266. }
  267. func (m *Request) GetInfo() *RequestInfo {
  268. if x, ok := m.GetValue().(*Request_Info); ok {
  269. return x.Info
  270. }
  271. return nil
  272. }
  273. func (m *Request) GetSetOption() *RequestSetOption {
  274. if x, ok := m.GetValue().(*Request_SetOption); ok {
  275. return x.SetOption
  276. }
  277. return nil
  278. }
  279. func (m *Request) GetInitChain() *RequestInitChain {
  280. if x, ok := m.GetValue().(*Request_InitChain); ok {
  281. return x.InitChain
  282. }
  283. return nil
  284. }
  285. func (m *Request) GetQuery() *RequestQuery {
  286. if x, ok := m.GetValue().(*Request_Query); ok {
  287. return x.Query
  288. }
  289. return nil
  290. }
  291. func (m *Request) GetBeginBlock() *RequestBeginBlock {
  292. if x, ok := m.GetValue().(*Request_BeginBlock); ok {
  293. return x.BeginBlock
  294. }
  295. return nil
  296. }
  297. func (m *Request) GetCheckTx() *RequestCheckTx {
  298. if x, ok := m.GetValue().(*Request_CheckTx); ok {
  299. return x.CheckTx
  300. }
  301. return nil
  302. }
  303. func (m *Request) GetDeliverTx() *RequestDeliverTx {
  304. if x, ok := m.GetValue().(*Request_DeliverTx); ok {
  305. return x.DeliverTx
  306. }
  307. return nil
  308. }
  309. func (m *Request) GetEndBlock() *RequestEndBlock {
  310. if x, ok := m.GetValue().(*Request_EndBlock); ok {
  311. return x.EndBlock
  312. }
  313. return nil
  314. }
  315. func (m *Request) GetCommit() *RequestCommit {
  316. if x, ok := m.GetValue().(*Request_Commit); ok {
  317. return x.Commit
  318. }
  319. return nil
  320. }
  321. func (m *Request) GetListSnapshots() *RequestListSnapshots {
  322. if x, ok := m.GetValue().(*Request_ListSnapshots); ok {
  323. return x.ListSnapshots
  324. }
  325. return nil
  326. }
  327. func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot {
  328. if x, ok := m.GetValue().(*Request_OfferSnapshot); ok {
  329. return x.OfferSnapshot
  330. }
  331. return nil
  332. }
  333. func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk {
  334. if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok {
  335. return x.LoadSnapshotChunk
  336. }
  337. return nil
  338. }
  339. func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk {
  340. if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok {
  341. return x.ApplySnapshotChunk
  342. }
  343. return nil
  344. }
  345. // XXX_OneofWrappers is for the internal use of the proto package.
  346. func (*Request) XXX_OneofWrappers() []interface{} {
  347. return []interface{}{
  348. (*Request_Echo)(nil),
  349. (*Request_Flush)(nil),
  350. (*Request_Info)(nil),
  351. (*Request_SetOption)(nil),
  352. (*Request_InitChain)(nil),
  353. (*Request_Query)(nil),
  354. (*Request_BeginBlock)(nil),
  355. (*Request_CheckTx)(nil),
  356. (*Request_DeliverTx)(nil),
  357. (*Request_EndBlock)(nil),
  358. (*Request_Commit)(nil),
  359. (*Request_ListSnapshots)(nil),
  360. (*Request_OfferSnapshot)(nil),
  361. (*Request_LoadSnapshotChunk)(nil),
  362. (*Request_ApplySnapshotChunk)(nil),
  363. }
  364. }
  365. type RequestEcho struct {
  366. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  367. }
  368. func (m *RequestEcho) Reset() { *m = RequestEcho{} }
  369. func (m *RequestEcho) String() string { return proto.CompactTextString(m) }
  370. func (*RequestEcho) ProtoMessage() {}
  371. func (*RequestEcho) Descriptor() ([]byte, []int) {
  372. return fileDescriptor_252557cfdd89a31a, []int{1}
  373. }
  374. func (m *RequestEcho) XXX_Unmarshal(b []byte) error {
  375. return m.Unmarshal(b)
  376. }
  377. func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  378. if deterministic {
  379. return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic)
  380. } else {
  381. b = b[:cap(b)]
  382. n, err := m.MarshalToSizedBuffer(b)
  383. if err != nil {
  384. return nil, err
  385. }
  386. return b[:n], nil
  387. }
  388. }
  389. func (m *RequestEcho) XXX_Merge(src proto.Message) {
  390. xxx_messageInfo_RequestEcho.Merge(m, src)
  391. }
  392. func (m *RequestEcho) XXX_Size() int {
  393. return m.Size()
  394. }
  395. func (m *RequestEcho) XXX_DiscardUnknown() {
  396. xxx_messageInfo_RequestEcho.DiscardUnknown(m)
  397. }
  398. var xxx_messageInfo_RequestEcho proto.InternalMessageInfo
  399. func (m *RequestEcho) GetMessage() string {
  400. if m != nil {
  401. return m.Message
  402. }
  403. return ""
  404. }
  405. type RequestFlush struct {
  406. }
  407. func (m *RequestFlush) Reset() { *m = RequestFlush{} }
  408. func (m *RequestFlush) String() string { return proto.CompactTextString(m) }
  409. func (*RequestFlush) ProtoMessage() {}
  410. func (*RequestFlush) Descriptor() ([]byte, []int) {
  411. return fileDescriptor_252557cfdd89a31a, []int{2}
  412. }
  413. func (m *RequestFlush) XXX_Unmarshal(b []byte) error {
  414. return m.Unmarshal(b)
  415. }
  416. func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  417. if deterministic {
  418. return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic)
  419. } else {
  420. b = b[:cap(b)]
  421. n, err := m.MarshalToSizedBuffer(b)
  422. if err != nil {
  423. return nil, err
  424. }
  425. return b[:n], nil
  426. }
  427. }
  428. func (m *RequestFlush) XXX_Merge(src proto.Message) {
  429. xxx_messageInfo_RequestFlush.Merge(m, src)
  430. }
  431. func (m *RequestFlush) XXX_Size() int {
  432. return m.Size()
  433. }
  434. func (m *RequestFlush) XXX_DiscardUnknown() {
  435. xxx_messageInfo_RequestFlush.DiscardUnknown(m)
  436. }
  437. var xxx_messageInfo_RequestFlush proto.InternalMessageInfo
  438. type RequestInfo struct {
  439. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  440. BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"`
  441. P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"`
  442. }
  443. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  444. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  445. func (*RequestInfo) ProtoMessage() {}
  446. func (*RequestInfo) Descriptor() ([]byte, []int) {
  447. return fileDescriptor_252557cfdd89a31a, []int{3}
  448. }
  449. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  450. return m.Unmarshal(b)
  451. }
  452. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  453. if deterministic {
  454. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  455. } else {
  456. b = b[:cap(b)]
  457. n, err := m.MarshalToSizedBuffer(b)
  458. if err != nil {
  459. return nil, err
  460. }
  461. return b[:n], nil
  462. }
  463. }
  464. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  465. xxx_messageInfo_RequestInfo.Merge(m, src)
  466. }
  467. func (m *RequestInfo) XXX_Size() int {
  468. return m.Size()
  469. }
  470. func (m *RequestInfo) XXX_DiscardUnknown() {
  471. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  472. }
  473. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  474. func (m *RequestInfo) GetVersion() string {
  475. if m != nil {
  476. return m.Version
  477. }
  478. return ""
  479. }
  480. func (m *RequestInfo) GetBlockVersion() uint64 {
  481. if m != nil {
  482. return m.BlockVersion
  483. }
  484. return 0
  485. }
  486. func (m *RequestInfo) GetP2PVersion() uint64 {
  487. if m != nil {
  488. return m.P2PVersion
  489. }
  490. return 0
  491. }
  492. // nondeterministic
  493. type RequestSetOption struct {
  494. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  495. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  496. }
  497. func (m *RequestSetOption) Reset() { *m = RequestSetOption{} }
  498. func (m *RequestSetOption) String() string { return proto.CompactTextString(m) }
  499. func (*RequestSetOption) ProtoMessage() {}
  500. func (*RequestSetOption) Descriptor() ([]byte, []int) {
  501. return fileDescriptor_252557cfdd89a31a, []int{4}
  502. }
  503. func (m *RequestSetOption) XXX_Unmarshal(b []byte) error {
  504. return m.Unmarshal(b)
  505. }
  506. func (m *RequestSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  507. if deterministic {
  508. return xxx_messageInfo_RequestSetOption.Marshal(b, m, deterministic)
  509. } else {
  510. b = b[:cap(b)]
  511. n, err := m.MarshalToSizedBuffer(b)
  512. if err != nil {
  513. return nil, err
  514. }
  515. return b[:n], nil
  516. }
  517. }
  518. func (m *RequestSetOption) XXX_Merge(src proto.Message) {
  519. xxx_messageInfo_RequestSetOption.Merge(m, src)
  520. }
  521. func (m *RequestSetOption) XXX_Size() int {
  522. return m.Size()
  523. }
  524. func (m *RequestSetOption) XXX_DiscardUnknown() {
  525. xxx_messageInfo_RequestSetOption.DiscardUnknown(m)
  526. }
  527. var xxx_messageInfo_RequestSetOption proto.InternalMessageInfo
  528. func (m *RequestSetOption) GetKey() string {
  529. if m != nil {
  530. return m.Key
  531. }
  532. return ""
  533. }
  534. func (m *RequestSetOption) GetValue() string {
  535. if m != nil {
  536. return m.Value
  537. }
  538. return ""
  539. }
  540. type RequestInitChain struct {
  541. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  542. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  543. ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  544. Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
  545. AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"`
  546. InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
  547. }
  548. func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
  549. func (m *RequestInitChain) String() string { return proto.CompactTextString(m) }
  550. func (*RequestInitChain) ProtoMessage() {}
  551. func (*RequestInitChain) Descriptor() ([]byte, []int) {
  552. return fileDescriptor_252557cfdd89a31a, []int{5}
  553. }
  554. func (m *RequestInitChain) XXX_Unmarshal(b []byte) error {
  555. return m.Unmarshal(b)
  556. }
  557. func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  558. if deterministic {
  559. return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic)
  560. } else {
  561. b = b[:cap(b)]
  562. n, err := m.MarshalToSizedBuffer(b)
  563. if err != nil {
  564. return nil, err
  565. }
  566. return b[:n], nil
  567. }
  568. }
  569. func (m *RequestInitChain) XXX_Merge(src proto.Message) {
  570. xxx_messageInfo_RequestInitChain.Merge(m, src)
  571. }
  572. func (m *RequestInitChain) XXX_Size() int {
  573. return m.Size()
  574. }
  575. func (m *RequestInitChain) XXX_DiscardUnknown() {
  576. xxx_messageInfo_RequestInitChain.DiscardUnknown(m)
  577. }
  578. var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo
  579. func (m *RequestInitChain) GetTime() time.Time {
  580. if m != nil {
  581. return m.Time
  582. }
  583. return time.Time{}
  584. }
  585. func (m *RequestInitChain) GetChainId() string {
  586. if m != nil {
  587. return m.ChainId
  588. }
  589. return ""
  590. }
  591. func (m *RequestInitChain) GetConsensusParams() *ConsensusParams {
  592. if m != nil {
  593. return m.ConsensusParams
  594. }
  595. return nil
  596. }
  597. func (m *RequestInitChain) GetValidators() []ValidatorUpdate {
  598. if m != nil {
  599. return m.Validators
  600. }
  601. return nil
  602. }
  603. func (m *RequestInitChain) GetAppStateBytes() []byte {
  604. if m != nil {
  605. return m.AppStateBytes
  606. }
  607. return nil
  608. }
  609. func (m *RequestInitChain) GetInitialHeight() int64 {
  610. if m != nil {
  611. return m.InitialHeight
  612. }
  613. return 0
  614. }
  615. type RequestQuery struct {
  616. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  617. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  618. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  619. Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"`
  620. }
  621. func (m *RequestQuery) Reset() { *m = RequestQuery{} }
  622. func (m *RequestQuery) String() string { return proto.CompactTextString(m) }
  623. func (*RequestQuery) ProtoMessage() {}
  624. func (*RequestQuery) Descriptor() ([]byte, []int) {
  625. return fileDescriptor_252557cfdd89a31a, []int{6}
  626. }
  627. func (m *RequestQuery) XXX_Unmarshal(b []byte) error {
  628. return m.Unmarshal(b)
  629. }
  630. func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  631. if deterministic {
  632. return xxx_messageInfo_RequestQuery.Marshal(b, m, deterministic)
  633. } else {
  634. b = b[:cap(b)]
  635. n, err := m.MarshalToSizedBuffer(b)
  636. if err != nil {
  637. return nil, err
  638. }
  639. return b[:n], nil
  640. }
  641. }
  642. func (m *RequestQuery) XXX_Merge(src proto.Message) {
  643. xxx_messageInfo_RequestQuery.Merge(m, src)
  644. }
  645. func (m *RequestQuery) XXX_Size() int {
  646. return m.Size()
  647. }
  648. func (m *RequestQuery) XXX_DiscardUnknown() {
  649. xxx_messageInfo_RequestQuery.DiscardUnknown(m)
  650. }
  651. var xxx_messageInfo_RequestQuery proto.InternalMessageInfo
  652. func (m *RequestQuery) GetData() []byte {
  653. if m != nil {
  654. return m.Data
  655. }
  656. return nil
  657. }
  658. func (m *RequestQuery) GetPath() string {
  659. if m != nil {
  660. return m.Path
  661. }
  662. return ""
  663. }
  664. func (m *RequestQuery) GetHeight() int64 {
  665. if m != nil {
  666. return m.Height
  667. }
  668. return 0
  669. }
  670. func (m *RequestQuery) GetProve() bool {
  671. if m != nil {
  672. return m.Prove
  673. }
  674. return false
  675. }
  676. type RequestBeginBlock struct {
  677. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  678. Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"`
  679. LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"`
  680. ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"`
  681. }
  682. func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
  683. func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) }
  684. func (*RequestBeginBlock) ProtoMessage() {}
  685. func (*RequestBeginBlock) Descriptor() ([]byte, []int) {
  686. return fileDescriptor_252557cfdd89a31a, []int{7}
  687. }
  688. func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error {
  689. return m.Unmarshal(b)
  690. }
  691. func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  692. if deterministic {
  693. return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic)
  694. } else {
  695. b = b[:cap(b)]
  696. n, err := m.MarshalToSizedBuffer(b)
  697. if err != nil {
  698. return nil, err
  699. }
  700. return b[:n], nil
  701. }
  702. }
  703. func (m *RequestBeginBlock) XXX_Merge(src proto.Message) {
  704. xxx_messageInfo_RequestBeginBlock.Merge(m, src)
  705. }
  706. func (m *RequestBeginBlock) XXX_Size() int {
  707. return m.Size()
  708. }
  709. func (m *RequestBeginBlock) XXX_DiscardUnknown() {
  710. xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m)
  711. }
  712. var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo
  713. func (m *RequestBeginBlock) GetHash() []byte {
  714. if m != nil {
  715. return m.Hash
  716. }
  717. return nil
  718. }
  719. func (m *RequestBeginBlock) GetHeader() types1.Header {
  720. if m != nil {
  721. return m.Header
  722. }
  723. return types1.Header{}
  724. }
  725. func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo {
  726. if m != nil {
  727. return m.LastCommitInfo
  728. }
  729. return LastCommitInfo{}
  730. }
  731. func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
  732. if m != nil {
  733. return m.ByzantineValidators
  734. }
  735. return nil
  736. }
  737. type RequestCheckTx struct {
  738. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  739. Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"`
  740. }
  741. func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} }
  742. func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) }
  743. func (*RequestCheckTx) ProtoMessage() {}
  744. func (*RequestCheckTx) Descriptor() ([]byte, []int) {
  745. return fileDescriptor_252557cfdd89a31a, []int{8}
  746. }
  747. func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error {
  748. return m.Unmarshal(b)
  749. }
  750. func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  751. if deterministic {
  752. return xxx_messageInfo_RequestCheckTx.Marshal(b, m, deterministic)
  753. } else {
  754. b = b[:cap(b)]
  755. n, err := m.MarshalToSizedBuffer(b)
  756. if err != nil {
  757. return nil, err
  758. }
  759. return b[:n], nil
  760. }
  761. }
  762. func (m *RequestCheckTx) XXX_Merge(src proto.Message) {
  763. xxx_messageInfo_RequestCheckTx.Merge(m, src)
  764. }
  765. func (m *RequestCheckTx) XXX_Size() int {
  766. return m.Size()
  767. }
  768. func (m *RequestCheckTx) XXX_DiscardUnknown() {
  769. xxx_messageInfo_RequestCheckTx.DiscardUnknown(m)
  770. }
  771. var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo
  772. func (m *RequestCheckTx) GetTx() []byte {
  773. if m != nil {
  774. return m.Tx
  775. }
  776. return nil
  777. }
  778. func (m *RequestCheckTx) GetType() CheckTxType {
  779. if m != nil {
  780. return m.Type
  781. }
  782. return CheckTxType_New
  783. }
  784. type RequestDeliverTx struct {
  785. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  786. }
  787. func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
  788. func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
  789. func (*RequestDeliverTx) ProtoMessage() {}
  790. func (*RequestDeliverTx) Descriptor() ([]byte, []int) {
  791. return fileDescriptor_252557cfdd89a31a, []int{9}
  792. }
  793. func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error {
  794. return m.Unmarshal(b)
  795. }
  796. func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  797. if deterministic {
  798. return xxx_messageInfo_RequestDeliverTx.Marshal(b, m, deterministic)
  799. } else {
  800. b = b[:cap(b)]
  801. n, err := m.MarshalToSizedBuffer(b)
  802. if err != nil {
  803. return nil, err
  804. }
  805. return b[:n], nil
  806. }
  807. }
  808. func (m *RequestDeliverTx) XXX_Merge(src proto.Message) {
  809. xxx_messageInfo_RequestDeliverTx.Merge(m, src)
  810. }
  811. func (m *RequestDeliverTx) XXX_Size() int {
  812. return m.Size()
  813. }
  814. func (m *RequestDeliverTx) XXX_DiscardUnknown() {
  815. xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m)
  816. }
  817. var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo
  818. func (m *RequestDeliverTx) GetTx() []byte {
  819. if m != nil {
  820. return m.Tx
  821. }
  822. return nil
  823. }
  824. type RequestEndBlock struct {
  825. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  826. }
  827. func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} }
  828. func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) }
  829. func (*RequestEndBlock) ProtoMessage() {}
  830. func (*RequestEndBlock) Descriptor() ([]byte, []int) {
  831. return fileDescriptor_252557cfdd89a31a, []int{10}
  832. }
  833. func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error {
  834. return m.Unmarshal(b)
  835. }
  836. func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  837. if deterministic {
  838. return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic)
  839. } else {
  840. b = b[:cap(b)]
  841. n, err := m.MarshalToSizedBuffer(b)
  842. if err != nil {
  843. return nil, err
  844. }
  845. return b[:n], nil
  846. }
  847. }
  848. func (m *RequestEndBlock) XXX_Merge(src proto.Message) {
  849. xxx_messageInfo_RequestEndBlock.Merge(m, src)
  850. }
  851. func (m *RequestEndBlock) XXX_Size() int {
  852. return m.Size()
  853. }
  854. func (m *RequestEndBlock) XXX_DiscardUnknown() {
  855. xxx_messageInfo_RequestEndBlock.DiscardUnknown(m)
  856. }
  857. var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo
  858. func (m *RequestEndBlock) GetHeight() int64 {
  859. if m != nil {
  860. return m.Height
  861. }
  862. return 0
  863. }
  864. type RequestCommit struct {
  865. }
  866. func (m *RequestCommit) Reset() { *m = RequestCommit{} }
  867. func (m *RequestCommit) String() string { return proto.CompactTextString(m) }
  868. func (*RequestCommit) ProtoMessage() {}
  869. func (*RequestCommit) Descriptor() ([]byte, []int) {
  870. return fileDescriptor_252557cfdd89a31a, []int{11}
  871. }
  872. func (m *RequestCommit) XXX_Unmarshal(b []byte) error {
  873. return m.Unmarshal(b)
  874. }
  875. func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  876. if deterministic {
  877. return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic)
  878. } else {
  879. b = b[:cap(b)]
  880. n, err := m.MarshalToSizedBuffer(b)
  881. if err != nil {
  882. return nil, err
  883. }
  884. return b[:n], nil
  885. }
  886. }
  887. func (m *RequestCommit) XXX_Merge(src proto.Message) {
  888. xxx_messageInfo_RequestCommit.Merge(m, src)
  889. }
  890. func (m *RequestCommit) XXX_Size() int {
  891. return m.Size()
  892. }
  893. func (m *RequestCommit) XXX_DiscardUnknown() {
  894. xxx_messageInfo_RequestCommit.DiscardUnknown(m)
  895. }
  896. var xxx_messageInfo_RequestCommit proto.InternalMessageInfo
  897. // lists available snapshots
  898. type RequestListSnapshots struct {
  899. }
  900. func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} }
  901. func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) }
  902. func (*RequestListSnapshots) ProtoMessage() {}
  903. func (*RequestListSnapshots) Descriptor() ([]byte, []int) {
  904. return fileDescriptor_252557cfdd89a31a, []int{12}
  905. }
  906. func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error {
  907. return m.Unmarshal(b)
  908. }
  909. func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  910. if deterministic {
  911. return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic)
  912. } else {
  913. b = b[:cap(b)]
  914. n, err := m.MarshalToSizedBuffer(b)
  915. if err != nil {
  916. return nil, err
  917. }
  918. return b[:n], nil
  919. }
  920. }
  921. func (m *RequestListSnapshots) XXX_Merge(src proto.Message) {
  922. xxx_messageInfo_RequestListSnapshots.Merge(m, src)
  923. }
  924. func (m *RequestListSnapshots) XXX_Size() int {
  925. return m.Size()
  926. }
  927. func (m *RequestListSnapshots) XXX_DiscardUnknown() {
  928. xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m)
  929. }
  930. var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo
  931. // offers a snapshot to the application
  932. type RequestOfferSnapshot struct {
  933. Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
  934. AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  935. }
  936. func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} }
  937. func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) }
  938. func (*RequestOfferSnapshot) ProtoMessage() {}
  939. func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) {
  940. return fileDescriptor_252557cfdd89a31a, []int{13}
  941. }
  942. func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error {
  943. return m.Unmarshal(b)
  944. }
  945. func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  946. if deterministic {
  947. return xxx_messageInfo_RequestOfferSnapshot.Marshal(b, m, deterministic)
  948. } else {
  949. b = b[:cap(b)]
  950. n, err := m.MarshalToSizedBuffer(b)
  951. if err != nil {
  952. return nil, err
  953. }
  954. return b[:n], nil
  955. }
  956. }
  957. func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) {
  958. xxx_messageInfo_RequestOfferSnapshot.Merge(m, src)
  959. }
  960. func (m *RequestOfferSnapshot) XXX_Size() int {
  961. return m.Size()
  962. }
  963. func (m *RequestOfferSnapshot) XXX_DiscardUnknown() {
  964. xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m)
  965. }
  966. var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo
  967. func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot {
  968. if m != nil {
  969. return m.Snapshot
  970. }
  971. return nil
  972. }
  973. func (m *RequestOfferSnapshot) GetAppHash() []byte {
  974. if m != nil {
  975. return m.AppHash
  976. }
  977. return nil
  978. }
  979. // loads a snapshot chunk
  980. type RequestLoadSnapshotChunk struct {
  981. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  982. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  983. Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
  984. }
  985. func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} }
  986. func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  987. func (*RequestLoadSnapshotChunk) ProtoMessage() {}
  988. func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  989. return fileDescriptor_252557cfdd89a31a, []int{14}
  990. }
  991. func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  992. return m.Unmarshal(b)
  993. }
  994. func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  995. if deterministic {
  996. return xxx_messageInfo_RequestLoadSnapshotChunk.Marshal(b, m, deterministic)
  997. } else {
  998. b = b[:cap(b)]
  999. n, err := m.MarshalToSizedBuffer(b)
  1000. if err != nil {
  1001. return nil, err
  1002. }
  1003. return b[:n], nil
  1004. }
  1005. }
  1006. func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  1007. xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src)
  1008. }
  1009. func (m *RequestLoadSnapshotChunk) XXX_Size() int {
  1010. return m.Size()
  1011. }
  1012. func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() {
  1013. xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m)
  1014. }
  1015. var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo
  1016. func (m *RequestLoadSnapshotChunk) GetHeight() uint64 {
  1017. if m != nil {
  1018. return m.Height
  1019. }
  1020. return 0
  1021. }
  1022. func (m *RequestLoadSnapshotChunk) GetFormat() uint32 {
  1023. if m != nil {
  1024. return m.Format
  1025. }
  1026. return 0
  1027. }
  1028. func (m *RequestLoadSnapshotChunk) GetChunk() uint32 {
  1029. if m != nil {
  1030. return m.Chunk
  1031. }
  1032. return 0
  1033. }
  1034. // Applies a snapshot chunk
  1035. type RequestApplySnapshotChunk struct {
  1036. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
  1037. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
  1038. Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
  1039. }
  1040. func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} }
  1041. func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  1042. func (*RequestApplySnapshotChunk) ProtoMessage() {}
  1043. func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) {
  1044. return fileDescriptor_252557cfdd89a31a, []int{15}
  1045. }
  1046. func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  1047. return m.Unmarshal(b)
  1048. }
  1049. func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1050. if deterministic {
  1051. return xxx_messageInfo_RequestApplySnapshotChunk.Marshal(b, m, deterministic)
  1052. } else {
  1053. b = b[:cap(b)]
  1054. n, err := m.MarshalToSizedBuffer(b)
  1055. if err != nil {
  1056. return nil, err
  1057. }
  1058. return b[:n], nil
  1059. }
  1060. }
  1061. func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) {
  1062. xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src)
  1063. }
  1064. func (m *RequestApplySnapshotChunk) XXX_Size() int {
  1065. return m.Size()
  1066. }
  1067. func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() {
  1068. xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m)
  1069. }
  1070. var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo
  1071. func (m *RequestApplySnapshotChunk) GetIndex() uint32 {
  1072. if m != nil {
  1073. return m.Index
  1074. }
  1075. return 0
  1076. }
  1077. func (m *RequestApplySnapshotChunk) GetChunk() []byte {
  1078. if m != nil {
  1079. return m.Chunk
  1080. }
  1081. return nil
  1082. }
  1083. func (m *RequestApplySnapshotChunk) GetSender() string {
  1084. if m != nil {
  1085. return m.Sender
  1086. }
  1087. return ""
  1088. }
  1089. type Response struct {
  1090. // Types that are valid to be assigned to Value:
  1091. // *Response_Exception
  1092. // *Response_Echo
  1093. // *Response_Flush
  1094. // *Response_Info
  1095. // *Response_SetOption
  1096. // *Response_InitChain
  1097. // *Response_Query
  1098. // *Response_BeginBlock
  1099. // *Response_CheckTx
  1100. // *Response_DeliverTx
  1101. // *Response_EndBlock
  1102. // *Response_Commit
  1103. // *Response_ListSnapshots
  1104. // *Response_OfferSnapshot
  1105. // *Response_LoadSnapshotChunk
  1106. // *Response_ApplySnapshotChunk
  1107. Value isResponse_Value `protobuf_oneof:"value"`
  1108. }
  1109. func (m *Response) Reset() { *m = Response{} }
  1110. func (m *Response) String() string { return proto.CompactTextString(m) }
  1111. func (*Response) ProtoMessage() {}
  1112. func (*Response) Descriptor() ([]byte, []int) {
  1113. return fileDescriptor_252557cfdd89a31a, []int{16}
  1114. }
  1115. func (m *Response) XXX_Unmarshal(b []byte) error {
  1116. return m.Unmarshal(b)
  1117. }
  1118. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1119. if deterministic {
  1120. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  1121. } else {
  1122. b = b[:cap(b)]
  1123. n, err := m.MarshalToSizedBuffer(b)
  1124. if err != nil {
  1125. return nil, err
  1126. }
  1127. return b[:n], nil
  1128. }
  1129. }
  1130. func (m *Response) XXX_Merge(src proto.Message) {
  1131. xxx_messageInfo_Response.Merge(m, src)
  1132. }
  1133. func (m *Response) XXX_Size() int {
  1134. return m.Size()
  1135. }
  1136. func (m *Response) XXX_DiscardUnknown() {
  1137. xxx_messageInfo_Response.DiscardUnknown(m)
  1138. }
  1139. var xxx_messageInfo_Response proto.InternalMessageInfo
  1140. type isResponse_Value interface {
  1141. isResponse_Value()
  1142. MarshalTo([]byte) (int, error)
  1143. Size() int
  1144. }
  1145. type Response_Exception struct {
  1146. Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"`
  1147. }
  1148. type Response_Echo struct {
  1149. Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  1150. }
  1151. type Response_Flush struct {
  1152. Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  1153. }
  1154. type Response_Info struct {
  1155. Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"`
  1156. }
  1157. type Response_SetOption struct {
  1158. SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"`
  1159. }
  1160. type Response_InitChain struct {
  1161. InitChain *ResponseInitChain `protobuf:"bytes,6,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  1162. }
  1163. type Response_Query struct {
  1164. Query *ResponseQuery `protobuf:"bytes,7,opt,name=query,proto3,oneof" json:"query,omitempty"`
  1165. }
  1166. type Response_BeginBlock struct {
  1167. BeginBlock *ResponseBeginBlock `protobuf:"bytes,8,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  1168. }
  1169. type Response_CheckTx struct {
  1170. CheckTx *ResponseCheckTx `protobuf:"bytes,9,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  1171. }
  1172. type Response_DeliverTx struct {
  1173. DeliverTx *ResponseDeliverTx `protobuf:"bytes,10,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  1174. }
  1175. type Response_EndBlock struct {
  1176. EndBlock *ResponseEndBlock `protobuf:"bytes,11,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  1177. }
  1178. type Response_Commit struct {
  1179. Commit *ResponseCommit `protobuf:"bytes,12,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  1180. }
  1181. type Response_ListSnapshots struct {
  1182. ListSnapshots *ResponseListSnapshots `protobuf:"bytes,13,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  1183. }
  1184. type Response_OfferSnapshot struct {
  1185. OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,14,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  1186. }
  1187. type Response_LoadSnapshotChunk struct {
  1188. LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,15,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  1189. }
  1190. type Response_ApplySnapshotChunk struct {
  1191. ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,16,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  1192. }
  1193. func (*Response_Exception) isResponse_Value() {}
  1194. func (*Response_Echo) isResponse_Value() {}
  1195. func (*Response_Flush) isResponse_Value() {}
  1196. func (*Response_Info) isResponse_Value() {}
  1197. func (*Response_SetOption) isResponse_Value() {}
  1198. func (*Response_InitChain) isResponse_Value() {}
  1199. func (*Response_Query) isResponse_Value() {}
  1200. func (*Response_BeginBlock) isResponse_Value() {}
  1201. func (*Response_CheckTx) isResponse_Value() {}
  1202. func (*Response_DeliverTx) isResponse_Value() {}
  1203. func (*Response_EndBlock) isResponse_Value() {}
  1204. func (*Response_Commit) isResponse_Value() {}
  1205. func (*Response_ListSnapshots) isResponse_Value() {}
  1206. func (*Response_OfferSnapshot) isResponse_Value() {}
  1207. func (*Response_LoadSnapshotChunk) isResponse_Value() {}
  1208. func (*Response_ApplySnapshotChunk) isResponse_Value() {}
  1209. func (m *Response) GetValue() isResponse_Value {
  1210. if m != nil {
  1211. return m.Value
  1212. }
  1213. return nil
  1214. }
  1215. func (m *Response) GetException() *ResponseException {
  1216. if x, ok := m.GetValue().(*Response_Exception); ok {
  1217. return x.Exception
  1218. }
  1219. return nil
  1220. }
  1221. func (m *Response) GetEcho() *ResponseEcho {
  1222. if x, ok := m.GetValue().(*Response_Echo); ok {
  1223. return x.Echo
  1224. }
  1225. return nil
  1226. }
  1227. func (m *Response) GetFlush() *ResponseFlush {
  1228. if x, ok := m.GetValue().(*Response_Flush); ok {
  1229. return x.Flush
  1230. }
  1231. return nil
  1232. }
  1233. func (m *Response) GetInfo() *ResponseInfo {
  1234. if x, ok := m.GetValue().(*Response_Info); ok {
  1235. return x.Info
  1236. }
  1237. return nil
  1238. }
  1239. func (m *Response) GetSetOption() *ResponseSetOption {
  1240. if x, ok := m.GetValue().(*Response_SetOption); ok {
  1241. return x.SetOption
  1242. }
  1243. return nil
  1244. }
  1245. func (m *Response) GetInitChain() *ResponseInitChain {
  1246. if x, ok := m.GetValue().(*Response_InitChain); ok {
  1247. return x.InitChain
  1248. }
  1249. return nil
  1250. }
  1251. func (m *Response) GetQuery() *ResponseQuery {
  1252. if x, ok := m.GetValue().(*Response_Query); ok {
  1253. return x.Query
  1254. }
  1255. return nil
  1256. }
  1257. func (m *Response) GetBeginBlock() *ResponseBeginBlock {
  1258. if x, ok := m.GetValue().(*Response_BeginBlock); ok {
  1259. return x.BeginBlock
  1260. }
  1261. return nil
  1262. }
  1263. func (m *Response) GetCheckTx() *ResponseCheckTx {
  1264. if x, ok := m.GetValue().(*Response_CheckTx); ok {
  1265. return x.CheckTx
  1266. }
  1267. return nil
  1268. }
  1269. func (m *Response) GetDeliverTx() *ResponseDeliverTx {
  1270. if x, ok := m.GetValue().(*Response_DeliverTx); ok {
  1271. return x.DeliverTx
  1272. }
  1273. return nil
  1274. }
  1275. func (m *Response) GetEndBlock() *ResponseEndBlock {
  1276. if x, ok := m.GetValue().(*Response_EndBlock); ok {
  1277. return x.EndBlock
  1278. }
  1279. return nil
  1280. }
  1281. func (m *Response) GetCommit() *ResponseCommit {
  1282. if x, ok := m.GetValue().(*Response_Commit); ok {
  1283. return x.Commit
  1284. }
  1285. return nil
  1286. }
  1287. func (m *Response) GetListSnapshots() *ResponseListSnapshots {
  1288. if x, ok := m.GetValue().(*Response_ListSnapshots); ok {
  1289. return x.ListSnapshots
  1290. }
  1291. return nil
  1292. }
  1293. func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot {
  1294. if x, ok := m.GetValue().(*Response_OfferSnapshot); ok {
  1295. return x.OfferSnapshot
  1296. }
  1297. return nil
  1298. }
  1299. func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk {
  1300. if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok {
  1301. return x.LoadSnapshotChunk
  1302. }
  1303. return nil
  1304. }
  1305. func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk {
  1306. if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok {
  1307. return x.ApplySnapshotChunk
  1308. }
  1309. return nil
  1310. }
  1311. // XXX_OneofWrappers is for the internal use of the proto package.
  1312. func (*Response) XXX_OneofWrappers() []interface{} {
  1313. return []interface{}{
  1314. (*Response_Exception)(nil),
  1315. (*Response_Echo)(nil),
  1316. (*Response_Flush)(nil),
  1317. (*Response_Info)(nil),
  1318. (*Response_SetOption)(nil),
  1319. (*Response_InitChain)(nil),
  1320. (*Response_Query)(nil),
  1321. (*Response_BeginBlock)(nil),
  1322. (*Response_CheckTx)(nil),
  1323. (*Response_DeliverTx)(nil),
  1324. (*Response_EndBlock)(nil),
  1325. (*Response_Commit)(nil),
  1326. (*Response_ListSnapshots)(nil),
  1327. (*Response_OfferSnapshot)(nil),
  1328. (*Response_LoadSnapshotChunk)(nil),
  1329. (*Response_ApplySnapshotChunk)(nil),
  1330. }
  1331. }
  1332. // nondeterministic
  1333. type ResponseException struct {
  1334. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
  1335. }
  1336. func (m *ResponseException) Reset() { *m = ResponseException{} }
  1337. func (m *ResponseException) String() string { return proto.CompactTextString(m) }
  1338. func (*ResponseException) ProtoMessage() {}
  1339. func (*ResponseException) Descriptor() ([]byte, []int) {
  1340. return fileDescriptor_252557cfdd89a31a, []int{17}
  1341. }
  1342. func (m *ResponseException) XXX_Unmarshal(b []byte) error {
  1343. return m.Unmarshal(b)
  1344. }
  1345. func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1346. if deterministic {
  1347. return xxx_messageInfo_ResponseException.Marshal(b, m, deterministic)
  1348. } else {
  1349. b = b[:cap(b)]
  1350. n, err := m.MarshalToSizedBuffer(b)
  1351. if err != nil {
  1352. return nil, err
  1353. }
  1354. return b[:n], nil
  1355. }
  1356. }
  1357. func (m *ResponseException) XXX_Merge(src proto.Message) {
  1358. xxx_messageInfo_ResponseException.Merge(m, src)
  1359. }
  1360. func (m *ResponseException) XXX_Size() int {
  1361. return m.Size()
  1362. }
  1363. func (m *ResponseException) XXX_DiscardUnknown() {
  1364. xxx_messageInfo_ResponseException.DiscardUnknown(m)
  1365. }
  1366. var xxx_messageInfo_ResponseException proto.InternalMessageInfo
  1367. func (m *ResponseException) GetError() string {
  1368. if m != nil {
  1369. return m.Error
  1370. }
  1371. return ""
  1372. }
  1373. type ResponseEcho struct {
  1374. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  1375. }
  1376. func (m *ResponseEcho) Reset() { *m = ResponseEcho{} }
  1377. func (m *ResponseEcho) String() string { return proto.CompactTextString(m) }
  1378. func (*ResponseEcho) ProtoMessage() {}
  1379. func (*ResponseEcho) Descriptor() ([]byte, []int) {
  1380. return fileDescriptor_252557cfdd89a31a, []int{18}
  1381. }
  1382. func (m *ResponseEcho) XXX_Unmarshal(b []byte) error {
  1383. return m.Unmarshal(b)
  1384. }
  1385. func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1386. if deterministic {
  1387. return xxx_messageInfo_ResponseEcho.Marshal(b, m, deterministic)
  1388. } else {
  1389. b = b[:cap(b)]
  1390. n, err := m.MarshalToSizedBuffer(b)
  1391. if err != nil {
  1392. return nil, err
  1393. }
  1394. return b[:n], nil
  1395. }
  1396. }
  1397. func (m *ResponseEcho) XXX_Merge(src proto.Message) {
  1398. xxx_messageInfo_ResponseEcho.Merge(m, src)
  1399. }
  1400. func (m *ResponseEcho) XXX_Size() int {
  1401. return m.Size()
  1402. }
  1403. func (m *ResponseEcho) XXX_DiscardUnknown() {
  1404. xxx_messageInfo_ResponseEcho.DiscardUnknown(m)
  1405. }
  1406. var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo
  1407. func (m *ResponseEcho) GetMessage() string {
  1408. if m != nil {
  1409. return m.Message
  1410. }
  1411. return ""
  1412. }
  1413. type ResponseFlush struct {
  1414. }
  1415. func (m *ResponseFlush) Reset() { *m = ResponseFlush{} }
  1416. func (m *ResponseFlush) String() string { return proto.CompactTextString(m) }
  1417. func (*ResponseFlush) ProtoMessage() {}
  1418. func (*ResponseFlush) Descriptor() ([]byte, []int) {
  1419. return fileDescriptor_252557cfdd89a31a, []int{19}
  1420. }
  1421. func (m *ResponseFlush) XXX_Unmarshal(b []byte) error {
  1422. return m.Unmarshal(b)
  1423. }
  1424. func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1425. if deterministic {
  1426. return xxx_messageInfo_ResponseFlush.Marshal(b, m, deterministic)
  1427. } else {
  1428. b = b[:cap(b)]
  1429. n, err := m.MarshalToSizedBuffer(b)
  1430. if err != nil {
  1431. return nil, err
  1432. }
  1433. return b[:n], nil
  1434. }
  1435. }
  1436. func (m *ResponseFlush) XXX_Merge(src proto.Message) {
  1437. xxx_messageInfo_ResponseFlush.Merge(m, src)
  1438. }
  1439. func (m *ResponseFlush) XXX_Size() int {
  1440. return m.Size()
  1441. }
  1442. func (m *ResponseFlush) XXX_DiscardUnknown() {
  1443. xxx_messageInfo_ResponseFlush.DiscardUnknown(m)
  1444. }
  1445. var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo
  1446. type ResponseInfo struct {
  1447. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  1448. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1449. AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  1450. LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  1451. LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"`
  1452. }
  1453. func (m *ResponseInfo) Reset() { *m = ResponseInfo{} }
  1454. func (m *ResponseInfo) String() string { return proto.CompactTextString(m) }
  1455. func (*ResponseInfo) ProtoMessage() {}
  1456. func (*ResponseInfo) Descriptor() ([]byte, []int) {
  1457. return fileDescriptor_252557cfdd89a31a, []int{20}
  1458. }
  1459. func (m *ResponseInfo) XXX_Unmarshal(b []byte) error {
  1460. return m.Unmarshal(b)
  1461. }
  1462. func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1463. if deterministic {
  1464. return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic)
  1465. } else {
  1466. b = b[:cap(b)]
  1467. n, err := m.MarshalToSizedBuffer(b)
  1468. if err != nil {
  1469. return nil, err
  1470. }
  1471. return b[:n], nil
  1472. }
  1473. }
  1474. func (m *ResponseInfo) XXX_Merge(src proto.Message) {
  1475. xxx_messageInfo_ResponseInfo.Merge(m, src)
  1476. }
  1477. func (m *ResponseInfo) XXX_Size() int {
  1478. return m.Size()
  1479. }
  1480. func (m *ResponseInfo) XXX_DiscardUnknown() {
  1481. xxx_messageInfo_ResponseInfo.DiscardUnknown(m)
  1482. }
  1483. var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo
  1484. func (m *ResponseInfo) GetData() string {
  1485. if m != nil {
  1486. return m.Data
  1487. }
  1488. return ""
  1489. }
  1490. func (m *ResponseInfo) GetVersion() string {
  1491. if m != nil {
  1492. return m.Version
  1493. }
  1494. return ""
  1495. }
  1496. func (m *ResponseInfo) GetAppVersion() uint64 {
  1497. if m != nil {
  1498. return m.AppVersion
  1499. }
  1500. return 0
  1501. }
  1502. func (m *ResponseInfo) GetLastBlockHeight() int64 {
  1503. if m != nil {
  1504. return m.LastBlockHeight
  1505. }
  1506. return 0
  1507. }
  1508. func (m *ResponseInfo) GetLastBlockAppHash() []byte {
  1509. if m != nil {
  1510. return m.LastBlockAppHash
  1511. }
  1512. return nil
  1513. }
  1514. // nondeterministic
  1515. type ResponseSetOption struct {
  1516. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1517. // bytes data = 2;
  1518. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1519. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1520. }
  1521. func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} }
  1522. func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) }
  1523. func (*ResponseSetOption) ProtoMessage() {}
  1524. func (*ResponseSetOption) Descriptor() ([]byte, []int) {
  1525. return fileDescriptor_252557cfdd89a31a, []int{21}
  1526. }
  1527. func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error {
  1528. return m.Unmarshal(b)
  1529. }
  1530. func (m *ResponseSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1531. if deterministic {
  1532. return xxx_messageInfo_ResponseSetOption.Marshal(b, m, deterministic)
  1533. } else {
  1534. b = b[:cap(b)]
  1535. n, err := m.MarshalToSizedBuffer(b)
  1536. if err != nil {
  1537. return nil, err
  1538. }
  1539. return b[:n], nil
  1540. }
  1541. }
  1542. func (m *ResponseSetOption) XXX_Merge(src proto.Message) {
  1543. xxx_messageInfo_ResponseSetOption.Merge(m, src)
  1544. }
  1545. func (m *ResponseSetOption) XXX_Size() int {
  1546. return m.Size()
  1547. }
  1548. func (m *ResponseSetOption) XXX_DiscardUnknown() {
  1549. xxx_messageInfo_ResponseSetOption.DiscardUnknown(m)
  1550. }
  1551. var xxx_messageInfo_ResponseSetOption proto.InternalMessageInfo
  1552. func (m *ResponseSetOption) GetCode() uint32 {
  1553. if m != nil {
  1554. return m.Code
  1555. }
  1556. return 0
  1557. }
  1558. func (m *ResponseSetOption) GetLog() string {
  1559. if m != nil {
  1560. return m.Log
  1561. }
  1562. return ""
  1563. }
  1564. func (m *ResponseSetOption) GetInfo() string {
  1565. if m != nil {
  1566. return m.Info
  1567. }
  1568. return ""
  1569. }
  1570. type ResponseInitChain struct {
  1571. ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  1572. Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
  1573. AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  1574. }
  1575. func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} }
  1576. func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) }
  1577. func (*ResponseInitChain) ProtoMessage() {}
  1578. func (*ResponseInitChain) Descriptor() ([]byte, []int) {
  1579. return fileDescriptor_252557cfdd89a31a, []int{22}
  1580. }
  1581. func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error {
  1582. return m.Unmarshal(b)
  1583. }
  1584. func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1585. if deterministic {
  1586. return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic)
  1587. } else {
  1588. b = b[:cap(b)]
  1589. n, err := m.MarshalToSizedBuffer(b)
  1590. if err != nil {
  1591. return nil, err
  1592. }
  1593. return b[:n], nil
  1594. }
  1595. }
  1596. func (m *ResponseInitChain) XXX_Merge(src proto.Message) {
  1597. xxx_messageInfo_ResponseInitChain.Merge(m, src)
  1598. }
  1599. func (m *ResponseInitChain) XXX_Size() int {
  1600. return m.Size()
  1601. }
  1602. func (m *ResponseInitChain) XXX_DiscardUnknown() {
  1603. xxx_messageInfo_ResponseInitChain.DiscardUnknown(m)
  1604. }
  1605. var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo
  1606. func (m *ResponseInitChain) GetConsensusParams() *ConsensusParams {
  1607. if m != nil {
  1608. return m.ConsensusParams
  1609. }
  1610. return nil
  1611. }
  1612. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1613. if m != nil {
  1614. return m.Validators
  1615. }
  1616. return nil
  1617. }
  1618. func (m *ResponseInitChain) GetAppHash() []byte {
  1619. if m != nil {
  1620. return m.AppHash
  1621. }
  1622. return nil
  1623. }
  1624. type ResponseQuery struct {
  1625. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1626. // bytes data = 2; // use "value" instead.
  1627. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1628. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1629. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1630. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1631. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1632. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1633. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1634. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1635. }
  1636. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1637. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1638. func (*ResponseQuery) ProtoMessage() {}
  1639. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1640. return fileDescriptor_252557cfdd89a31a, []int{23}
  1641. }
  1642. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1643. return m.Unmarshal(b)
  1644. }
  1645. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1646. if deterministic {
  1647. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1648. } else {
  1649. b = b[:cap(b)]
  1650. n, err := m.MarshalToSizedBuffer(b)
  1651. if err != nil {
  1652. return nil, err
  1653. }
  1654. return b[:n], nil
  1655. }
  1656. }
  1657. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1658. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1659. }
  1660. func (m *ResponseQuery) XXX_Size() int {
  1661. return m.Size()
  1662. }
  1663. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1664. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1665. }
  1666. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1667. func (m *ResponseQuery) GetCode() uint32 {
  1668. if m != nil {
  1669. return m.Code
  1670. }
  1671. return 0
  1672. }
  1673. func (m *ResponseQuery) GetLog() string {
  1674. if m != nil {
  1675. return m.Log
  1676. }
  1677. return ""
  1678. }
  1679. func (m *ResponseQuery) GetInfo() string {
  1680. if m != nil {
  1681. return m.Info
  1682. }
  1683. return ""
  1684. }
  1685. func (m *ResponseQuery) GetIndex() int64 {
  1686. if m != nil {
  1687. return m.Index
  1688. }
  1689. return 0
  1690. }
  1691. func (m *ResponseQuery) GetKey() []byte {
  1692. if m != nil {
  1693. return m.Key
  1694. }
  1695. return nil
  1696. }
  1697. func (m *ResponseQuery) GetValue() []byte {
  1698. if m != nil {
  1699. return m.Value
  1700. }
  1701. return nil
  1702. }
  1703. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1704. if m != nil {
  1705. return m.ProofOps
  1706. }
  1707. return nil
  1708. }
  1709. func (m *ResponseQuery) GetHeight() int64 {
  1710. if m != nil {
  1711. return m.Height
  1712. }
  1713. return 0
  1714. }
  1715. func (m *ResponseQuery) GetCodespace() string {
  1716. if m != nil {
  1717. return m.Codespace
  1718. }
  1719. return ""
  1720. }
  1721. type ResponseBeginBlock struct {
  1722. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1723. }
  1724. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1725. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1726. func (*ResponseBeginBlock) ProtoMessage() {}
  1727. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1728. return fileDescriptor_252557cfdd89a31a, []int{24}
  1729. }
  1730. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1731. return m.Unmarshal(b)
  1732. }
  1733. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1734. if deterministic {
  1735. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1736. } else {
  1737. b = b[:cap(b)]
  1738. n, err := m.MarshalToSizedBuffer(b)
  1739. if err != nil {
  1740. return nil, err
  1741. }
  1742. return b[:n], nil
  1743. }
  1744. }
  1745. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1746. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1747. }
  1748. func (m *ResponseBeginBlock) XXX_Size() int {
  1749. return m.Size()
  1750. }
  1751. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1752. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1753. }
  1754. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1755. func (m *ResponseBeginBlock) GetEvents() []Event {
  1756. if m != nil {
  1757. return m.Events
  1758. }
  1759. return nil
  1760. }
  1761. type ResponseCheckTx struct {
  1762. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1763. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1764. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1765. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1766. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1767. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1768. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1769. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1770. }
  1771. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1772. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1773. func (*ResponseCheckTx) ProtoMessage() {}
  1774. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1775. return fileDescriptor_252557cfdd89a31a, []int{25}
  1776. }
  1777. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1778. return m.Unmarshal(b)
  1779. }
  1780. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1781. if deterministic {
  1782. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1783. } else {
  1784. b = b[:cap(b)]
  1785. n, err := m.MarshalToSizedBuffer(b)
  1786. if err != nil {
  1787. return nil, err
  1788. }
  1789. return b[:n], nil
  1790. }
  1791. }
  1792. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1793. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1794. }
  1795. func (m *ResponseCheckTx) XXX_Size() int {
  1796. return m.Size()
  1797. }
  1798. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1799. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1800. }
  1801. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1802. func (m *ResponseCheckTx) GetCode() uint32 {
  1803. if m != nil {
  1804. return m.Code
  1805. }
  1806. return 0
  1807. }
  1808. func (m *ResponseCheckTx) GetData() []byte {
  1809. if m != nil {
  1810. return m.Data
  1811. }
  1812. return nil
  1813. }
  1814. func (m *ResponseCheckTx) GetLog() string {
  1815. if m != nil {
  1816. return m.Log
  1817. }
  1818. return ""
  1819. }
  1820. func (m *ResponseCheckTx) GetInfo() string {
  1821. if m != nil {
  1822. return m.Info
  1823. }
  1824. return ""
  1825. }
  1826. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1827. if m != nil {
  1828. return m.GasWanted
  1829. }
  1830. return 0
  1831. }
  1832. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1833. if m != nil {
  1834. return m.GasUsed
  1835. }
  1836. return 0
  1837. }
  1838. func (m *ResponseCheckTx) GetEvents() []Event {
  1839. if m != nil {
  1840. return m.Events
  1841. }
  1842. return nil
  1843. }
  1844. func (m *ResponseCheckTx) GetCodespace() string {
  1845. if m != nil {
  1846. return m.Codespace
  1847. }
  1848. return ""
  1849. }
  1850. type ResponseDeliverTx struct {
  1851. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1852. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1853. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1854. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1855. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1856. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1857. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1858. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1859. }
  1860. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1861. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1862. func (*ResponseDeliverTx) ProtoMessage() {}
  1863. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1864. return fileDescriptor_252557cfdd89a31a, []int{26}
  1865. }
  1866. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1867. return m.Unmarshal(b)
  1868. }
  1869. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1870. if deterministic {
  1871. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1872. } else {
  1873. b = b[:cap(b)]
  1874. n, err := m.MarshalToSizedBuffer(b)
  1875. if err != nil {
  1876. return nil, err
  1877. }
  1878. return b[:n], nil
  1879. }
  1880. }
  1881. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1882. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1883. }
  1884. func (m *ResponseDeliverTx) XXX_Size() int {
  1885. return m.Size()
  1886. }
  1887. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1888. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1889. }
  1890. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1891. func (m *ResponseDeliverTx) GetCode() uint32 {
  1892. if m != nil {
  1893. return m.Code
  1894. }
  1895. return 0
  1896. }
  1897. func (m *ResponseDeliverTx) GetData() []byte {
  1898. if m != nil {
  1899. return m.Data
  1900. }
  1901. return nil
  1902. }
  1903. func (m *ResponseDeliverTx) GetLog() string {
  1904. if m != nil {
  1905. return m.Log
  1906. }
  1907. return ""
  1908. }
  1909. func (m *ResponseDeliverTx) GetInfo() string {
  1910. if m != nil {
  1911. return m.Info
  1912. }
  1913. return ""
  1914. }
  1915. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1916. if m != nil {
  1917. return m.GasWanted
  1918. }
  1919. return 0
  1920. }
  1921. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1922. if m != nil {
  1923. return m.GasUsed
  1924. }
  1925. return 0
  1926. }
  1927. func (m *ResponseDeliverTx) GetEvents() []Event {
  1928. if m != nil {
  1929. return m.Events
  1930. }
  1931. return nil
  1932. }
  1933. func (m *ResponseDeliverTx) GetCodespace() string {
  1934. if m != nil {
  1935. return m.Codespace
  1936. }
  1937. return ""
  1938. }
  1939. type ResponseEndBlock struct {
  1940. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1941. ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1942. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1943. }
  1944. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1945. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1946. func (*ResponseEndBlock) ProtoMessage() {}
  1947. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1948. return fileDescriptor_252557cfdd89a31a, []int{27}
  1949. }
  1950. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1951. return m.Unmarshal(b)
  1952. }
  1953. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1954. if deterministic {
  1955. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1956. } else {
  1957. b = b[:cap(b)]
  1958. n, err := m.MarshalToSizedBuffer(b)
  1959. if err != nil {
  1960. return nil, err
  1961. }
  1962. return b[:n], nil
  1963. }
  1964. }
  1965. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1966. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1967. }
  1968. func (m *ResponseEndBlock) XXX_Size() int {
  1969. return m.Size()
  1970. }
  1971. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1972. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1973. }
  1974. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1975. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1976. if m != nil {
  1977. return m.ValidatorUpdates
  1978. }
  1979. return nil
  1980. }
  1981. func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams {
  1982. if m != nil {
  1983. return m.ConsensusParamUpdates
  1984. }
  1985. return nil
  1986. }
  1987. func (m *ResponseEndBlock) GetEvents() []Event {
  1988. if m != nil {
  1989. return m.Events
  1990. }
  1991. return nil
  1992. }
  1993. type ResponseCommit struct {
  1994. // reserve 1
  1995. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1996. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1997. }
  1998. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1999. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  2000. func (*ResponseCommit) ProtoMessage() {}
  2001. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  2002. return fileDescriptor_252557cfdd89a31a, []int{28}
  2003. }
  2004. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  2005. return m.Unmarshal(b)
  2006. }
  2007. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2008. if deterministic {
  2009. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  2010. } else {
  2011. b = b[:cap(b)]
  2012. n, err := m.MarshalToSizedBuffer(b)
  2013. if err != nil {
  2014. return nil, err
  2015. }
  2016. return b[:n], nil
  2017. }
  2018. }
  2019. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  2020. xxx_messageInfo_ResponseCommit.Merge(m, src)
  2021. }
  2022. func (m *ResponseCommit) XXX_Size() int {
  2023. return m.Size()
  2024. }
  2025. func (m *ResponseCommit) XXX_DiscardUnknown() {
  2026. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  2027. }
  2028. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  2029. func (m *ResponseCommit) GetData() []byte {
  2030. if m != nil {
  2031. return m.Data
  2032. }
  2033. return nil
  2034. }
  2035. func (m *ResponseCommit) GetRetainHeight() int64 {
  2036. if m != nil {
  2037. return m.RetainHeight
  2038. }
  2039. return 0
  2040. }
  2041. type ResponseListSnapshots struct {
  2042. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  2043. }
  2044. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  2045. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  2046. func (*ResponseListSnapshots) ProtoMessage() {}
  2047. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  2048. return fileDescriptor_252557cfdd89a31a, []int{29}
  2049. }
  2050. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  2051. return m.Unmarshal(b)
  2052. }
  2053. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2054. if deterministic {
  2055. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  2056. } else {
  2057. b = b[:cap(b)]
  2058. n, err := m.MarshalToSizedBuffer(b)
  2059. if err != nil {
  2060. return nil, err
  2061. }
  2062. return b[:n], nil
  2063. }
  2064. }
  2065. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  2066. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  2067. }
  2068. func (m *ResponseListSnapshots) XXX_Size() int {
  2069. return m.Size()
  2070. }
  2071. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  2072. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  2073. }
  2074. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  2075. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  2076. if m != nil {
  2077. return m.Snapshots
  2078. }
  2079. return nil
  2080. }
  2081. type ResponseOfferSnapshot struct {
  2082. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  2083. }
  2084. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  2085. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  2086. func (*ResponseOfferSnapshot) ProtoMessage() {}
  2087. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  2088. return fileDescriptor_252557cfdd89a31a, []int{30}
  2089. }
  2090. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  2091. return m.Unmarshal(b)
  2092. }
  2093. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2094. if deterministic {
  2095. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  2096. } else {
  2097. b = b[:cap(b)]
  2098. n, err := m.MarshalToSizedBuffer(b)
  2099. if err != nil {
  2100. return nil, err
  2101. }
  2102. return b[:n], nil
  2103. }
  2104. }
  2105. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  2106. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  2107. }
  2108. func (m *ResponseOfferSnapshot) XXX_Size() int {
  2109. return m.Size()
  2110. }
  2111. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  2112. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  2113. }
  2114. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  2115. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  2116. if m != nil {
  2117. return m.Result
  2118. }
  2119. return ResponseOfferSnapshot_UNKNOWN
  2120. }
  2121. type ResponseLoadSnapshotChunk struct {
  2122. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2123. }
  2124. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2125. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2126. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2127. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2128. return fileDescriptor_252557cfdd89a31a, []int{31}
  2129. }
  2130. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2131. return m.Unmarshal(b)
  2132. }
  2133. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2134. if deterministic {
  2135. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2136. } else {
  2137. b = b[:cap(b)]
  2138. n, err := m.MarshalToSizedBuffer(b)
  2139. if err != nil {
  2140. return nil, err
  2141. }
  2142. return b[:n], nil
  2143. }
  2144. }
  2145. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2146. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2147. }
  2148. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2149. return m.Size()
  2150. }
  2151. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2152. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2153. }
  2154. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2155. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2156. if m != nil {
  2157. return m.Chunk
  2158. }
  2159. return nil
  2160. }
  2161. type ResponseApplySnapshotChunk struct {
  2162. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2163. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2164. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2165. }
  2166. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2167. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2168. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2169. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2170. return fileDescriptor_252557cfdd89a31a, []int{32}
  2171. }
  2172. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2173. return m.Unmarshal(b)
  2174. }
  2175. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2176. if deterministic {
  2177. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2178. } else {
  2179. b = b[:cap(b)]
  2180. n, err := m.MarshalToSizedBuffer(b)
  2181. if err != nil {
  2182. return nil, err
  2183. }
  2184. return b[:n], nil
  2185. }
  2186. }
  2187. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2188. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2189. }
  2190. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2191. return m.Size()
  2192. }
  2193. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2194. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2195. }
  2196. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2197. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2198. if m != nil {
  2199. return m.Result
  2200. }
  2201. return ResponseApplySnapshotChunk_UNKNOWN
  2202. }
  2203. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2204. if m != nil {
  2205. return m.RefetchChunks
  2206. }
  2207. return nil
  2208. }
  2209. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2210. if m != nil {
  2211. return m.RejectSenders
  2212. }
  2213. return nil
  2214. }
  2215. // ConsensusParams contains all consensus-relevant parameters
  2216. // that can be adjusted by the abci app
  2217. type ConsensusParams struct {
  2218. Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
  2219. Evidence *types1.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
  2220. Validator *types1.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"`
  2221. Version *types1.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  2222. }
  2223. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  2224. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  2225. func (*ConsensusParams) ProtoMessage() {}
  2226. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  2227. return fileDescriptor_252557cfdd89a31a, []int{33}
  2228. }
  2229. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  2230. return m.Unmarshal(b)
  2231. }
  2232. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2233. if deterministic {
  2234. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  2235. } else {
  2236. b = b[:cap(b)]
  2237. n, err := m.MarshalToSizedBuffer(b)
  2238. if err != nil {
  2239. return nil, err
  2240. }
  2241. return b[:n], nil
  2242. }
  2243. }
  2244. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  2245. xxx_messageInfo_ConsensusParams.Merge(m, src)
  2246. }
  2247. func (m *ConsensusParams) XXX_Size() int {
  2248. return m.Size()
  2249. }
  2250. func (m *ConsensusParams) XXX_DiscardUnknown() {
  2251. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  2252. }
  2253. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  2254. func (m *ConsensusParams) GetBlock() *BlockParams {
  2255. if m != nil {
  2256. return m.Block
  2257. }
  2258. return nil
  2259. }
  2260. func (m *ConsensusParams) GetEvidence() *types1.EvidenceParams {
  2261. if m != nil {
  2262. return m.Evidence
  2263. }
  2264. return nil
  2265. }
  2266. func (m *ConsensusParams) GetValidator() *types1.ValidatorParams {
  2267. if m != nil {
  2268. return m.Validator
  2269. }
  2270. return nil
  2271. }
  2272. func (m *ConsensusParams) GetVersion() *types1.VersionParams {
  2273. if m != nil {
  2274. return m.Version
  2275. }
  2276. return nil
  2277. }
  2278. // BlockParams contains limits on the block size.
  2279. type BlockParams struct {
  2280. // Note: must be greater than 0
  2281. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  2282. // Note: must be greater or equal to -1
  2283. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  2284. }
  2285. func (m *BlockParams) Reset() { *m = BlockParams{} }
  2286. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  2287. func (*BlockParams) ProtoMessage() {}
  2288. func (*BlockParams) Descriptor() ([]byte, []int) {
  2289. return fileDescriptor_252557cfdd89a31a, []int{34}
  2290. }
  2291. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  2292. return m.Unmarshal(b)
  2293. }
  2294. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2295. if deterministic {
  2296. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  2297. } else {
  2298. b = b[:cap(b)]
  2299. n, err := m.MarshalToSizedBuffer(b)
  2300. if err != nil {
  2301. return nil, err
  2302. }
  2303. return b[:n], nil
  2304. }
  2305. }
  2306. func (m *BlockParams) XXX_Merge(src proto.Message) {
  2307. xxx_messageInfo_BlockParams.Merge(m, src)
  2308. }
  2309. func (m *BlockParams) XXX_Size() int {
  2310. return m.Size()
  2311. }
  2312. func (m *BlockParams) XXX_DiscardUnknown() {
  2313. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  2314. }
  2315. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  2316. func (m *BlockParams) GetMaxBytes() int64 {
  2317. if m != nil {
  2318. return m.MaxBytes
  2319. }
  2320. return 0
  2321. }
  2322. func (m *BlockParams) GetMaxGas() int64 {
  2323. if m != nil {
  2324. return m.MaxGas
  2325. }
  2326. return 0
  2327. }
  2328. type LastCommitInfo struct {
  2329. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2330. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2331. }
  2332. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2333. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2334. func (*LastCommitInfo) ProtoMessage() {}
  2335. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2336. return fileDescriptor_252557cfdd89a31a, []int{35}
  2337. }
  2338. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2339. return m.Unmarshal(b)
  2340. }
  2341. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2342. if deterministic {
  2343. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2344. } else {
  2345. b = b[:cap(b)]
  2346. n, err := m.MarshalToSizedBuffer(b)
  2347. if err != nil {
  2348. return nil, err
  2349. }
  2350. return b[:n], nil
  2351. }
  2352. }
  2353. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2354. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2355. }
  2356. func (m *LastCommitInfo) XXX_Size() int {
  2357. return m.Size()
  2358. }
  2359. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2360. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2361. }
  2362. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2363. func (m *LastCommitInfo) GetRound() int32 {
  2364. if m != nil {
  2365. return m.Round
  2366. }
  2367. return 0
  2368. }
  2369. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2370. if m != nil {
  2371. return m.Votes
  2372. }
  2373. return nil
  2374. }
  2375. // Event allows application developers to attach additional information to
  2376. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2377. // Later, transactions may be queried using these events.
  2378. type Event struct {
  2379. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2380. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2381. }
  2382. func (m *Event) Reset() { *m = Event{} }
  2383. func (m *Event) String() string { return proto.CompactTextString(m) }
  2384. func (*Event) ProtoMessage() {}
  2385. func (*Event) Descriptor() ([]byte, []int) {
  2386. return fileDescriptor_252557cfdd89a31a, []int{36}
  2387. }
  2388. func (m *Event) XXX_Unmarshal(b []byte) error {
  2389. return m.Unmarshal(b)
  2390. }
  2391. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2392. if deterministic {
  2393. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2394. } else {
  2395. b = b[:cap(b)]
  2396. n, err := m.MarshalToSizedBuffer(b)
  2397. if err != nil {
  2398. return nil, err
  2399. }
  2400. return b[:n], nil
  2401. }
  2402. }
  2403. func (m *Event) XXX_Merge(src proto.Message) {
  2404. xxx_messageInfo_Event.Merge(m, src)
  2405. }
  2406. func (m *Event) XXX_Size() int {
  2407. return m.Size()
  2408. }
  2409. func (m *Event) XXX_DiscardUnknown() {
  2410. xxx_messageInfo_Event.DiscardUnknown(m)
  2411. }
  2412. var xxx_messageInfo_Event proto.InternalMessageInfo
  2413. func (m *Event) GetType() string {
  2414. if m != nil {
  2415. return m.Type
  2416. }
  2417. return ""
  2418. }
  2419. func (m *Event) GetAttributes() []EventAttribute {
  2420. if m != nil {
  2421. return m.Attributes
  2422. }
  2423. return nil
  2424. }
  2425. // EventAttribute is a single key-value pair, associated with an event.
  2426. type EventAttribute struct {
  2427. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2428. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2429. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2430. }
  2431. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2432. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2433. func (*EventAttribute) ProtoMessage() {}
  2434. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2435. return fileDescriptor_252557cfdd89a31a, []int{37}
  2436. }
  2437. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2438. return m.Unmarshal(b)
  2439. }
  2440. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2441. if deterministic {
  2442. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2443. } else {
  2444. b = b[:cap(b)]
  2445. n, err := m.MarshalToSizedBuffer(b)
  2446. if err != nil {
  2447. return nil, err
  2448. }
  2449. return b[:n], nil
  2450. }
  2451. }
  2452. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2453. xxx_messageInfo_EventAttribute.Merge(m, src)
  2454. }
  2455. func (m *EventAttribute) XXX_Size() int {
  2456. return m.Size()
  2457. }
  2458. func (m *EventAttribute) XXX_DiscardUnknown() {
  2459. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2460. }
  2461. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2462. func (m *EventAttribute) GetKey() []byte {
  2463. if m != nil {
  2464. return m.Key
  2465. }
  2466. return nil
  2467. }
  2468. func (m *EventAttribute) GetValue() []byte {
  2469. if m != nil {
  2470. return m.Value
  2471. }
  2472. return nil
  2473. }
  2474. func (m *EventAttribute) GetIndex() bool {
  2475. if m != nil {
  2476. return m.Index
  2477. }
  2478. return false
  2479. }
  2480. // TxResult contains results of executing the transaction.
  2481. //
  2482. // One usage is indexing transaction results.
  2483. type TxResult struct {
  2484. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2485. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2486. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2487. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2488. }
  2489. func (m *TxResult) Reset() { *m = TxResult{} }
  2490. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2491. func (*TxResult) ProtoMessage() {}
  2492. func (*TxResult) Descriptor() ([]byte, []int) {
  2493. return fileDescriptor_252557cfdd89a31a, []int{38}
  2494. }
  2495. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2496. return m.Unmarshal(b)
  2497. }
  2498. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2499. if deterministic {
  2500. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2501. } else {
  2502. b = b[:cap(b)]
  2503. n, err := m.MarshalToSizedBuffer(b)
  2504. if err != nil {
  2505. return nil, err
  2506. }
  2507. return b[:n], nil
  2508. }
  2509. }
  2510. func (m *TxResult) XXX_Merge(src proto.Message) {
  2511. xxx_messageInfo_TxResult.Merge(m, src)
  2512. }
  2513. func (m *TxResult) XXX_Size() int {
  2514. return m.Size()
  2515. }
  2516. func (m *TxResult) XXX_DiscardUnknown() {
  2517. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2518. }
  2519. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2520. func (m *TxResult) GetHeight() int64 {
  2521. if m != nil {
  2522. return m.Height
  2523. }
  2524. return 0
  2525. }
  2526. func (m *TxResult) GetIndex() uint32 {
  2527. if m != nil {
  2528. return m.Index
  2529. }
  2530. return 0
  2531. }
  2532. func (m *TxResult) GetTx() []byte {
  2533. if m != nil {
  2534. return m.Tx
  2535. }
  2536. return nil
  2537. }
  2538. func (m *TxResult) GetResult() ResponseDeliverTx {
  2539. if m != nil {
  2540. return m.Result
  2541. }
  2542. return ResponseDeliverTx{}
  2543. }
  2544. // Validator
  2545. type Validator struct {
  2546. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2547. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2548. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2549. }
  2550. func (m *Validator) Reset() { *m = Validator{} }
  2551. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2552. func (*Validator) ProtoMessage() {}
  2553. func (*Validator) Descriptor() ([]byte, []int) {
  2554. return fileDescriptor_252557cfdd89a31a, []int{39}
  2555. }
  2556. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2557. return m.Unmarshal(b)
  2558. }
  2559. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2560. if deterministic {
  2561. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2562. } else {
  2563. b = b[:cap(b)]
  2564. n, err := m.MarshalToSizedBuffer(b)
  2565. if err != nil {
  2566. return nil, err
  2567. }
  2568. return b[:n], nil
  2569. }
  2570. }
  2571. func (m *Validator) XXX_Merge(src proto.Message) {
  2572. xxx_messageInfo_Validator.Merge(m, src)
  2573. }
  2574. func (m *Validator) XXX_Size() int {
  2575. return m.Size()
  2576. }
  2577. func (m *Validator) XXX_DiscardUnknown() {
  2578. xxx_messageInfo_Validator.DiscardUnknown(m)
  2579. }
  2580. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2581. func (m *Validator) GetAddress() []byte {
  2582. if m != nil {
  2583. return m.Address
  2584. }
  2585. return nil
  2586. }
  2587. func (m *Validator) GetPower() int64 {
  2588. if m != nil {
  2589. return m.Power
  2590. }
  2591. return 0
  2592. }
  2593. // ValidatorUpdate
  2594. type ValidatorUpdate struct {
  2595. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2596. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2597. }
  2598. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2599. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2600. func (*ValidatorUpdate) ProtoMessage() {}
  2601. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2602. return fileDescriptor_252557cfdd89a31a, []int{40}
  2603. }
  2604. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2605. return m.Unmarshal(b)
  2606. }
  2607. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2608. if deterministic {
  2609. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2610. } else {
  2611. b = b[:cap(b)]
  2612. n, err := m.MarshalToSizedBuffer(b)
  2613. if err != nil {
  2614. return nil, err
  2615. }
  2616. return b[:n], nil
  2617. }
  2618. }
  2619. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2620. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2621. }
  2622. func (m *ValidatorUpdate) XXX_Size() int {
  2623. return m.Size()
  2624. }
  2625. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2626. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2627. }
  2628. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2629. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2630. if m != nil {
  2631. return m.PubKey
  2632. }
  2633. return crypto.PublicKey{}
  2634. }
  2635. func (m *ValidatorUpdate) GetPower() int64 {
  2636. if m != nil {
  2637. return m.Power
  2638. }
  2639. return 0
  2640. }
  2641. // VoteInfo
  2642. type VoteInfo struct {
  2643. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2644. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2645. }
  2646. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2647. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2648. func (*VoteInfo) ProtoMessage() {}
  2649. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2650. return fileDescriptor_252557cfdd89a31a, []int{41}
  2651. }
  2652. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2653. return m.Unmarshal(b)
  2654. }
  2655. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2656. if deterministic {
  2657. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2658. } else {
  2659. b = b[:cap(b)]
  2660. n, err := m.MarshalToSizedBuffer(b)
  2661. if err != nil {
  2662. return nil, err
  2663. }
  2664. return b[:n], nil
  2665. }
  2666. }
  2667. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2668. xxx_messageInfo_VoteInfo.Merge(m, src)
  2669. }
  2670. func (m *VoteInfo) XXX_Size() int {
  2671. return m.Size()
  2672. }
  2673. func (m *VoteInfo) XXX_DiscardUnknown() {
  2674. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2675. }
  2676. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2677. func (m *VoteInfo) GetValidator() Validator {
  2678. if m != nil {
  2679. return m.Validator
  2680. }
  2681. return Validator{}
  2682. }
  2683. func (m *VoteInfo) GetSignedLastBlock() bool {
  2684. if m != nil {
  2685. return m.SignedLastBlock
  2686. }
  2687. return false
  2688. }
  2689. type Evidence struct {
  2690. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2691. // The offending validator
  2692. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2693. // The height when the offense occurred
  2694. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2695. // The corresponding time where the offense occurred
  2696. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2697. // Total voting power of the validator set in case the ABCI application does
  2698. // not store historical validators.
  2699. // https://github.com/tendermint/tendermint/issues/4581
  2700. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2701. }
  2702. func (m *Evidence) Reset() { *m = Evidence{} }
  2703. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2704. func (*Evidence) ProtoMessage() {}
  2705. func (*Evidence) Descriptor() ([]byte, []int) {
  2706. return fileDescriptor_252557cfdd89a31a, []int{42}
  2707. }
  2708. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2709. return m.Unmarshal(b)
  2710. }
  2711. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2712. if deterministic {
  2713. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2714. } else {
  2715. b = b[:cap(b)]
  2716. n, err := m.MarshalToSizedBuffer(b)
  2717. if err != nil {
  2718. return nil, err
  2719. }
  2720. return b[:n], nil
  2721. }
  2722. }
  2723. func (m *Evidence) XXX_Merge(src proto.Message) {
  2724. xxx_messageInfo_Evidence.Merge(m, src)
  2725. }
  2726. func (m *Evidence) XXX_Size() int {
  2727. return m.Size()
  2728. }
  2729. func (m *Evidence) XXX_DiscardUnknown() {
  2730. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2731. }
  2732. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2733. func (m *Evidence) GetType() EvidenceType {
  2734. if m != nil {
  2735. return m.Type
  2736. }
  2737. return EvidenceType_UNKNOWN
  2738. }
  2739. func (m *Evidence) GetValidator() Validator {
  2740. if m != nil {
  2741. return m.Validator
  2742. }
  2743. return Validator{}
  2744. }
  2745. func (m *Evidence) GetHeight() int64 {
  2746. if m != nil {
  2747. return m.Height
  2748. }
  2749. return 0
  2750. }
  2751. func (m *Evidence) GetTime() time.Time {
  2752. if m != nil {
  2753. return m.Time
  2754. }
  2755. return time.Time{}
  2756. }
  2757. func (m *Evidence) GetTotalVotingPower() int64 {
  2758. if m != nil {
  2759. return m.TotalVotingPower
  2760. }
  2761. return 0
  2762. }
  2763. type Snapshot struct {
  2764. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2765. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2766. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2767. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2768. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2769. }
  2770. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2771. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2772. func (*Snapshot) ProtoMessage() {}
  2773. func (*Snapshot) Descriptor() ([]byte, []int) {
  2774. return fileDescriptor_252557cfdd89a31a, []int{43}
  2775. }
  2776. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2777. return m.Unmarshal(b)
  2778. }
  2779. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2780. if deterministic {
  2781. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2782. } else {
  2783. b = b[:cap(b)]
  2784. n, err := m.MarshalToSizedBuffer(b)
  2785. if err != nil {
  2786. return nil, err
  2787. }
  2788. return b[:n], nil
  2789. }
  2790. }
  2791. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2792. xxx_messageInfo_Snapshot.Merge(m, src)
  2793. }
  2794. func (m *Snapshot) XXX_Size() int {
  2795. return m.Size()
  2796. }
  2797. func (m *Snapshot) XXX_DiscardUnknown() {
  2798. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2799. }
  2800. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2801. func (m *Snapshot) GetHeight() uint64 {
  2802. if m != nil {
  2803. return m.Height
  2804. }
  2805. return 0
  2806. }
  2807. func (m *Snapshot) GetFormat() uint32 {
  2808. if m != nil {
  2809. return m.Format
  2810. }
  2811. return 0
  2812. }
  2813. func (m *Snapshot) GetChunks() uint32 {
  2814. if m != nil {
  2815. return m.Chunks
  2816. }
  2817. return 0
  2818. }
  2819. func (m *Snapshot) GetHash() []byte {
  2820. if m != nil {
  2821. return m.Hash
  2822. }
  2823. return nil
  2824. }
  2825. func (m *Snapshot) GetMetadata() []byte {
  2826. if m != nil {
  2827. return m.Metadata
  2828. }
  2829. return nil
  2830. }
  2831. func init() {
  2832. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2833. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2834. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2835. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2836. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2837. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2838. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2839. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2840. proto.RegisterType((*RequestSetOption)(nil), "tendermint.abci.RequestSetOption")
  2841. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2842. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2843. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2844. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2845. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2846. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2847. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2848. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2849. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2850. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2851. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2852. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2853. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2854. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2855. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2856. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2857. proto.RegisterType((*ResponseSetOption)(nil), "tendermint.abci.ResponseSetOption")
  2858. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2859. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2860. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2861. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2862. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2863. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2864. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2865. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2866. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2867. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2868. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2869. proto.RegisterType((*ConsensusParams)(nil), "tendermint.abci.ConsensusParams")
  2870. proto.RegisterType((*BlockParams)(nil), "tendermint.abci.BlockParams")
  2871. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2872. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2873. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2874. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2875. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2876. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2877. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2878. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2879. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2880. }
  2881. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2882. var fileDescriptor_252557cfdd89a31a = []byte{
  2883. // 2741 bytes of a gzipped FileDescriptorProto
  2884. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7,
  2885. 0x11, 0xc6, 0xfb, 0xd1, 0x24, 0x1e, 0x1c, 0xd1, 0x12, 0xb4, 0x92, 0x48, 0x79, 0x55, 0x72, 0x2c,
  2886. 0xd9, 0x26, 0x63, 0xaa, 0xa4, 0x48, 0xb1, 0x13, 0x9b, 0x80, 0x20, 0x83, 0x26, 0x4d, 0x30, 0x4b,
  2887. 0x48, 0xce, 0xcb, 0x5a, 0x2f, 0xb0, 0x43, 0x60, 0x2d, 0x60, 0x77, 0x8d, 0x1d, 0x50, 0xa4, 0x8f,
  2888. 0x71, 0x72, 0x51, 0x2e, 0xce, 0x2d, 0x17, 0xff, 0x8f, 0x9c, 0x72, 0xc9, 0xc5, 0x55, 0xb9, 0xf8,
  2889. 0x98, 0x93, 0x93, 0x92, 0x2a, 0x97, 0xfc, 0x81, 0x9c, 0x52, 0x49, 0xcd, 0x63, 0x5f, 0x00, 0x16,
  2890. 0x00, 0xed, 0xdc, 0x7c, 0x9b, 0x99, 0xed, 0xee, 0xc5, 0xf4, 0x4e, 0x7f, 0xfd, 0x75, 0x0f, 0xe0,
  2891. 0x12, 0xc1, 0xa6, 0x8e, 0x87, 0x03, 0xc3, 0x24, 0x9b, 0x5a, 0xbb, 0x63, 0x6c, 0x92, 0x53, 0x1b,
  2892. 0x3b, 0x1b, 0xf6, 0xd0, 0x22, 0x16, 0x2a, 0xf9, 0x0f, 0x37, 0xe8, 0x43, 0xe9, 0x4a, 0x40, 0xba,
  2893. 0x33, 0x3c, 0xb5, 0x89, 0xb5, 0x69, 0x0f, 0x2d, 0xeb, 0x88, 0xcb, 0x4b, 0x97, 0x03, 0x8f, 0x99,
  2894. 0x9d, 0xa0, 0xb5, 0xd0, 0x53, 0xa1, 0xfc, 0x04, 0x9f, 0xba, 0x4f, 0xaf, 0x4c, 0xe8, 0xda, 0xda,
  2895. 0x50, 0x1b, 0xb8, 0x8f, 0xd7, 0xbb, 0x96, 0xd5, 0xed, 0xe3, 0x4d, 0x36, 0x6b, 0x8f, 0x8e, 0x36,
  2896. 0x89, 0x31, 0xc0, 0x0e, 0xd1, 0x06, 0xb6, 0x10, 0x58, 0xed, 0x5a, 0x5d, 0x8b, 0x0d, 0x37, 0xe9,
  2897. 0x88, 0xaf, 0xca, 0x7f, 0xc8, 0x41, 0x56, 0xc1, 0x9f, 0x8e, 0xb0, 0x43, 0xd0, 0x16, 0xa4, 0x70,
  2898. 0xa7, 0x67, 0x55, 0xe2, 0x57, 0xe3, 0xaf, 0x2e, 0x6d, 0x5d, 0xde, 0x18, 0xdb, 0xdc, 0x86, 0x90,
  2899. 0xab, 0x77, 0x7a, 0x56, 0x23, 0xa6, 0x30, 0x59, 0x74, 0x1b, 0xd2, 0x47, 0xfd, 0x91, 0xd3, 0xab,
  2900. 0x24, 0x98, 0xd2, 0x95, 0x28, 0xa5, 0x07, 0x54, 0xa8, 0x11, 0x53, 0xb8, 0x34, 0x7d, 0x95, 0x61,
  2901. 0x1e, 0x59, 0x95, 0xe4, 0xec, 0x57, 0xed, 0x98, 0x47, 0xec, 0x55, 0x54, 0x16, 0x55, 0x01, 0x1c,
  2902. 0x4c, 0x54, 0xcb, 0x26, 0x86, 0x65, 0x56, 0x52, 0x4c, 0xf3, 0xe5, 0x28, 0xcd, 0x43, 0x4c, 0x9a,
  2903. 0x4c, 0xb0, 0x11, 0x53, 0xf2, 0x8e, 0x3b, 0xa1, 0x36, 0x0c, 0xd3, 0x20, 0x6a, 0xa7, 0xa7, 0x19,
  2904. 0x66, 0x25, 0x3d, 0xdb, 0xc6, 0x8e, 0x69, 0x90, 0x1a, 0x15, 0xa4, 0x36, 0x0c, 0x77, 0x42, 0xb7,
  2905. 0xfc, 0xe9, 0x08, 0x0f, 0x4f, 0x2b, 0x99, 0xd9, 0x5b, 0xfe, 0x19, 0x15, 0xa2, 0x5b, 0x66, 0xd2,
  2906. 0xa8, 0x0e, 0x4b, 0x6d, 0xdc, 0x35, 0x4c, 0xb5, 0xdd, 0xb7, 0x3a, 0x4f, 0x2a, 0x59, 0xa6, 0x2c,
  2907. 0x47, 0x29, 0x57, 0xa9, 0x68, 0x95, 0x4a, 0x36, 0x62, 0x0a, 0xb4, 0xbd, 0x19, 0x7a, 0x1b, 0x72,
  2908. 0x9d, 0x1e, 0xee, 0x3c, 0x51, 0xc9, 0x49, 0x25, 0xc7, 0x6c, 0xac, 0x47, 0xd9, 0xa8, 0x51, 0xb9,
  2909. 0xd6, 0x49, 0x23, 0xa6, 0x64, 0x3b, 0x7c, 0x48, 0xf7, 0xaf, 0xe3, 0xbe, 0x71, 0x8c, 0x87, 0x54,
  2910. 0x3f, 0x3f, 0x7b, 0xff, 0xf7, 0xb9, 0x24, 0xb3, 0x90, 0xd7, 0xdd, 0x09, 0x7a, 0x07, 0xf2, 0xd8,
  2911. 0xd4, 0xc5, 0x36, 0x80, 0x99, 0xb8, 0x1a, 0x79, 0x56, 0x4c, 0xdd, 0xdd, 0x44, 0x0e, 0x8b, 0x31,
  2912. 0xba, 0x0b, 0x99, 0x8e, 0x35, 0x18, 0x18, 0xa4, 0xb2, 0xc4, 0xb4, 0xd7, 0x22, 0x37, 0xc0, 0xa4,
  2913. 0x1a, 0x31, 0x45, 0xc8, 0xa3, 0x7d, 0x28, 0xf6, 0x0d, 0x87, 0xa8, 0x8e, 0xa9, 0xd9, 0x4e, 0xcf,
  2914. 0x22, 0x4e, 0x65, 0x99, 0x59, 0xb8, 0x1e, 0x65, 0x61, 0xcf, 0x70, 0xc8, 0xa1, 0x2b, 0xdc, 0x88,
  2915. 0x29, 0x85, 0x7e, 0x70, 0x81, 0xda, 0xb3, 0x8e, 0x8e, 0xf0, 0xd0, 0x33, 0x58, 0x29, 0xcc, 0xb6,
  2916. 0xd7, 0xa4, 0xd2, 0xae, 0x3e, 0xb5, 0x67, 0x05, 0x17, 0xd0, 0xaf, 0xe0, 0x5c, 0xdf, 0xd2, 0x74,
  2917. 0xcf, 0x9c, 0xda, 0xe9, 0x8d, 0xcc, 0x27, 0x95, 0x22, 0x33, 0x7a, 0x23, 0xf2, 0x47, 0x5a, 0x9a,
  2918. 0xee, 0x9a, 0xa8, 0x51, 0x85, 0x46, 0x4c, 0x59, 0xe9, 0x8f, 0x2f, 0xa2, 0xc7, 0xb0, 0xaa, 0xd9,
  2919. 0x76, 0xff, 0x74, 0xdc, 0x7a, 0x89, 0x59, 0xbf, 0x19, 0x65, 0x7d, 0x9b, 0xea, 0x8c, 0x9b, 0x47,
  2920. 0xda, 0xc4, 0x6a, 0x35, 0x0b, 0xe9, 0x63, 0xad, 0x3f, 0xc2, 0xf2, 0x0f, 0x60, 0x29, 0x10, 0xea,
  2921. 0xa8, 0x02, 0xd9, 0x01, 0x76, 0x1c, 0xad, 0x8b, 0x19, 0x32, 0xe4, 0x15, 0x77, 0x2a, 0x17, 0x61,
  2922. 0x39, 0x18, 0xde, 0xf2, 0xc0, 0x53, 0xa4, 0x81, 0x4b, 0x15, 0x8f, 0xf1, 0xd0, 0xa1, 0xd1, 0x2a,
  2923. 0x14, 0xc5, 0x14, 0x5d, 0x83, 0x02, 0x3b, 0x3e, 0xaa, 0xfb, 0x9c, 0xa2, 0x47, 0x4a, 0x59, 0x66,
  2924. 0x8b, 0x8f, 0x84, 0xd0, 0x3a, 0x2c, 0xd9, 0x5b, 0xb6, 0x27, 0x92, 0x64, 0x22, 0x60, 0x6f, 0xd9,
  2925. 0x42, 0x40, 0xfe, 0x31, 0x94, 0xc7, 0xa3, 0x1d, 0x95, 0x21, 0xf9, 0x04, 0x9f, 0x8a, 0xf7, 0xd1,
  2926. 0x21, 0x5a, 0x15, 0xdb, 0x62, 0xef, 0xc8, 0x2b, 0x62, 0x8f, 0x7f, 0x4d, 0x78, 0xca, 0x5e, 0x98,
  2927. 0xa3, 0xbb, 0x90, 0xa2, 0xa8, 0x29, 0x00, 0x50, 0xda, 0xe0, 0x90, 0xba, 0xe1, 0x42, 0xea, 0x46,
  2928. 0xcb, 0x85, 0xd4, 0x6a, 0xee, 0xab, 0x6f, 0xd6, 0x63, 0x5f, 0xfc, 0x7d, 0x3d, 0xae, 0x30, 0x0d,
  2929. 0x74, 0x91, 0x46, 0xa5, 0x66, 0x98, 0xaa, 0xa1, 0x8b, 0xf7, 0x64, 0xd9, 0x7c, 0x47, 0x47, 0xbb,
  2930. 0x50, 0xee, 0x58, 0xa6, 0x83, 0x4d, 0x67, 0xe4, 0xa8, 0x1c, 0xb2, 0x05, 0xec, 0x4d, 0x46, 0x4d,
  2931. 0xcd, 0x15, 0x3c, 0x60, 0x72, 0x4a, 0xa9, 0x13, 0x5e, 0x40, 0x0f, 0x00, 0x8e, 0xb5, 0xbe, 0xa1,
  2932. 0x6b, 0xc4, 0x1a, 0x3a, 0x95, 0xd4, 0xd5, 0xe4, 0x54, 0x33, 0x8f, 0x5c, 0x91, 0x87, 0xb6, 0xae,
  2933. 0x11, 0x5c, 0x4d, 0xd1, 0x5f, 0xab, 0x04, 0x34, 0xd1, 0x2b, 0x50, 0xd2, 0x6c, 0x5b, 0x75, 0x88,
  2934. 0x46, 0xb0, 0xda, 0x3e, 0x25, 0xd8, 0x61, 0x60, 0xb8, 0xac, 0x14, 0x34, 0xdb, 0x3e, 0xa4, 0xab,
  2935. 0x55, 0xba, 0x88, 0xae, 0x43, 0x91, 0x02, 0x9f, 0xa1, 0xf5, 0xd5, 0x1e, 0x36, 0xba, 0x3d, 0xc2,
  2936. 0x40, 0x2f, 0xa9, 0x14, 0xc4, 0x6a, 0x83, 0x2d, 0xca, 0xba, 0x77, 0x10, 0x18, 0xe8, 0x21, 0x04,
  2937. 0x29, 0x5d, 0x23, 0x1a, 0x73, 0xe4, 0xb2, 0xc2, 0xc6, 0x74, 0xcd, 0xd6, 0x48, 0x4f, 0xb8, 0x87,
  2938. 0x8d, 0xd1, 0x79, 0xc8, 0x08, 0xb3, 0x49, 0x66, 0x56, 0xcc, 0xe8, 0x37, 0xb3, 0x87, 0xd6, 0x31,
  2939. 0x66, 0x28, 0x9f, 0x53, 0xf8, 0x44, 0xfe, 0x6d, 0x02, 0x56, 0x26, 0xe0, 0x91, 0xda, 0xed, 0x69,
  2940. 0x4e, 0xcf, 0x7d, 0x17, 0x1d, 0xa3, 0x3b, 0xd4, 0xae, 0xa6, 0xe3, 0xa1, 0x48, 0x4b, 0x95, 0xa0,
  2941. 0x8b, 0x78, 0xca, 0x6d, 0xb0, 0xe7, 0xc2, 0x35, 0x42, 0x1a, 0x35, 0xa1, 0xdc, 0xd7, 0x1c, 0xa2,
  2942. 0x72, 0xb8, 0x51, 0x03, 0x29, 0x6a, 0x12, 0x64, 0xf7, 0x34, 0x17, 0xa0, 0xe8, 0x61, 0x17, 0x86,
  2943. 0x8a, 0xfd, 0xd0, 0x2a, 0x52, 0x60, 0xb5, 0x7d, 0xfa, 0x99, 0x66, 0x12, 0xc3, 0xc4, 0xea, 0xc4,
  2944. 0x97, 0xbb, 0x38, 0x61, 0xb4, 0x7e, 0x6c, 0xe8, 0xd8, 0xec, 0xb8, 0x9f, 0xec, 0x9c, 0xa7, 0xec,
  2945. 0x7d, 0x52, 0x47, 0x56, 0xa0, 0x18, 0x06, 0x78, 0x54, 0x84, 0x04, 0x39, 0x11, 0x0e, 0x48, 0x90,
  2946. 0x13, 0xf4, 0x43, 0x48, 0xd1, 0x4d, 0xb2, 0xcd, 0x17, 0xa7, 0x64, 0x57, 0xa1, 0xd7, 0x3a, 0xb5,
  2947. 0xb1, 0xc2, 0x24, 0x65, 0xd9, 0x8b, 0x06, 0x0f, 0xf4, 0xc7, 0xad, 0xca, 0x37, 0xa0, 0x34, 0x86,
  2948. 0xea, 0x81, 0xef, 0x17, 0x0f, 0x7e, 0x3f, 0xb9, 0x04, 0x85, 0x10, 0x84, 0xcb, 0xe7, 0x61, 0x75,
  2949. 0x1a, 0x22, 0xcb, 0x3d, 0x6f, 0x3d, 0x84, 0xac, 0xe8, 0x36, 0xe4, 0x3c, 0x48, 0xe6, 0xd1, 0x38,
  2950. 0xe9, 0x2b, 0x57, 0x58, 0xf1, 0x44, 0x69, 0x18, 0xd2, 0x63, 0xcd, 0xce, 0x43, 0x82, 0xfd, 0xf0,
  2951. 0xac, 0x66, 0xdb, 0x0d, 0xcd, 0xe9, 0xc9, 0x1f, 0x43, 0x25, 0x0a, 0x6e, 0xc7, 0xb6, 0x91, 0xf2,
  2952. 0x8e, 0xe1, 0x79, 0xc8, 0x1c, 0x59, 0xc3, 0x81, 0x46, 0x98, 0xb1, 0x82, 0x22, 0x66, 0xf4, 0x78,
  2953. 0x72, 0xe8, 0x4d, 0xb2, 0x65, 0x3e, 0x91, 0x55, 0xb8, 0x18, 0x09, 0xb9, 0x54, 0xc5, 0x30, 0x75,
  2954. 0xcc, 0xfd, 0x59, 0x50, 0xf8, 0xc4, 0x37, 0xc4, 0x7f, 0x2c, 0x9f, 0xd0, 0xd7, 0x3a, 0x6c, 0xaf,
  2955. 0xcc, 0x7e, 0x5e, 0x11, 0x33, 0xf9, 0x9f, 0x39, 0xc8, 0x29, 0xd8, 0xb1, 0x29, 0x26, 0xa0, 0x2a,
  2956. 0xe4, 0xf1, 0x49, 0x07, 0x73, 0x32, 0x14, 0x8f, 0x24, 0x13, 0x5c, 0xba, 0xee, 0x4a, 0xd2, 0x4c,
  2957. 0xee, 0xa9, 0xa1, 0x5b, 0x82, 0xf0, 0x45, 0x73, 0x37, 0xa1, 0x1e, 0x64, 0x7c, 0x77, 0x5c, 0xc6,
  2958. 0x97, 0x8c, 0x4c, 0xde, 0x5c, 0x6b, 0x8c, 0xf2, 0xdd, 0x12, 0x94, 0x2f, 0x35, 0xe7, 0x65, 0x21,
  2959. 0xce, 0x57, 0x0b, 0x71, 0xbe, 0xf4, 0x9c, 0x6d, 0x46, 0x90, 0xbe, 0x5a, 0x88, 0xf4, 0x65, 0xe6,
  2960. 0x18, 0x89, 0x60, 0x7d, 0x77, 0x5c, 0xd6, 0x97, 0x9d, 0xb3, 0xed, 0x31, 0xda, 0xf7, 0x20, 0x4c,
  2961. 0xfb, 0x38, 0x65, 0xbb, 0x16, 0xa9, 0x1d, 0xc9, 0xfb, 0x7e, 0x12, 0xe0, 0x7d, 0xf9, 0x48, 0xd2,
  2962. 0xc5, 0x8d, 0x4c, 0x21, 0x7e, 0xb5, 0x10, 0xf1, 0x83, 0x39, 0x3e, 0x88, 0x60, 0x7e, 0xef, 0x06,
  2963. 0x99, 0xdf, 0x52, 0x24, 0x79, 0x14, 0x87, 0x66, 0x1a, 0xf5, 0xbb, 0xe7, 0x51, 0xbf, 0xe5, 0x48,
  2964. 0xee, 0x2a, 0xf6, 0x30, 0xce, 0xfd, 0x9a, 0x13, 0xdc, 0x8f, 0x73, 0xb5, 0x57, 0x22, 0x4d, 0xcc,
  2965. 0x21, 0x7f, 0xcd, 0x09, 0xf2, 0x57, 0x9c, 0x63, 0x70, 0x0e, 0xfb, 0xfb, 0xf5, 0x74, 0xf6, 0x17,
  2966. 0xcd, 0xcf, 0xc4, 0xcf, 0x5c, 0x8c, 0xfe, 0xa9, 0x11, 0xf4, 0xaf, 0xcc, 0xcc, 0xbf, 0x16, 0x69,
  2967. 0xfe, 0xec, 0xfc, 0xef, 0x06, 0x4d, 0xb3, 0x63, 0xc0, 0x41, 0xa1, 0x0a, 0x0f, 0x87, 0xd6, 0x50,
  2968. 0x50, 0x2b, 0x3e, 0x91, 0x5f, 0xa5, 0x89, 0xdf, 0x07, 0x89, 0x19, 0x5c, 0x91, 0xa5, 0x84, 0x00,
  2969. 0x30, 0xc8, 0x7f, 0x8a, 0xfb, 0xba, 0x2c, 0x57, 0x06, 0x49, 0x43, 0x5e, 0x90, 0x86, 0x00, 0x85,
  2970. 0x4c, 0x84, 0x29, 0xe4, 0x3a, 0x2c, 0x51, 0xa8, 0x1f, 0x63, 0x87, 0x9a, 0xed, 0xb2, 0x43, 0x74,
  2971. 0x13, 0x56, 0x58, 0x2e, 0xe7, 0x44, 0x53, 0xe0, 0x7b, 0x8a, 0xa5, 0xa9, 0x12, 0x7d, 0xc0, 0x0f,
  2972. 0x27, 0x07, 0xfa, 0x37, 0xe0, 0x5c, 0x40, 0xd6, 0x4b, 0x21, 0x9c, 0x12, 0x95, 0x3d, 0xe9, 0x6d,
  2973. 0x91, 0x4b, 0x3e, 0xf0, 0x1d, 0xe4, 0x33, 0x4f, 0x04, 0xa9, 0x8e, 0xa5, 0x63, 0x01, 0xf0, 0x6c,
  2974. 0x4c, 0xd9, 0x68, 0xdf, 0xea, 0x0a, 0x18, 0xa7, 0x43, 0x2a, 0xe5, 0xa1, 0x60, 0x9e, 0x83, 0x9c,
  2975. 0xfc, 0x97, 0xb8, 0x6f, 0xcf, 0x27, 0xa3, 0xd3, 0x78, 0x63, 0xfc, 0xff, 0xc3, 0x1b, 0x13, 0xdf,
  2976. 0x9a, 0x37, 0x06, 0x13, 0x6c, 0x32, 0x9c, 0x60, 0xff, 0x1d, 0xf7, 0xbf, 0xb0, 0xc7, 0x02, 0xbf,
  2977. 0x9d, 0x47, 0xfc, 0x6c, 0x99, 0x66, 0xdf, 0x4b, 0x64, 0x4b, 0xc1, 0xed, 0x33, 0xec, 0xbd, 0x61,
  2978. 0x6e, 0x9f, 0xe5, 0xf9, 0x93, 0x4d, 0xd0, 0x5d, 0xc8, 0xb3, 0xa6, 0x8b, 0x6a, 0xd9, 0x8e, 0x00,
  2979. 0xdc, 0x4b, 0xc1, 0xbd, 0xf2, 0xde, 0xca, 0xc6, 0x01, 0x95, 0x69, 0xda, 0x8e, 0x92, 0xb3, 0xc5,
  2980. 0x28, 0x40, 0x04, 0xf2, 0x21, 0x3e, 0x7a, 0x19, 0xf2, 0xf4, 0xd7, 0x3b, 0xb6, 0xd6, 0xc1, 0x0c,
  2981. 0x3c, 0xf3, 0x8a, 0xbf, 0x20, 0x3f, 0x06, 0x34, 0x09, 0xdf, 0xa8, 0x01, 0x19, 0x7c, 0x8c, 0x4d,
  2982. 0x42, 0xbf, 0x1a, 0x75, 0xf7, 0xf9, 0x29, 0x64, 0x0f, 0x9b, 0xa4, 0x5a, 0xa1, 0x4e, 0xfe, 0xd7,
  2983. 0x37, 0xeb, 0x65, 0x2e, 0xfd, 0xba, 0x35, 0x30, 0x08, 0x1e, 0xd8, 0xe4, 0x54, 0x11, 0xfa, 0xf2,
  2984. 0xe7, 0x09, 0xca, 0xbc, 0x42, 0xd0, 0x3e, 0xd5, 0xb7, 0x6e, 0x00, 0x25, 0x02, 0xac, 0x7b, 0x31,
  2985. 0x7f, 0xaf, 0x01, 0x74, 0x35, 0x47, 0x7d, 0xaa, 0x99, 0x04, 0xeb, 0xc2, 0xe9, 0x81, 0x15, 0x24,
  2986. 0x41, 0x8e, 0xce, 0x46, 0x0e, 0xd6, 0x45, 0x01, 0xe0, 0xcd, 0x03, 0xfb, 0xcc, 0x7e, 0xb7, 0x7d,
  2987. 0x86, 0xbd, 0x9c, 0x1b, 0xf7, 0xf2, 0xef, 0x12, 0x7e, 0x94, 0xf8, 0x24, 0xf5, 0xfb, 0xe7, 0x87,
  2988. 0xdf, 0xb3, 0xca, 0x35, 0x9c, 0x63, 0xd1, 0x21, 0xac, 0x78, 0x51, 0xaa, 0x8e, 0x58, 0xf4, 0xba,
  2989. 0xe7, 0x6e, 0xd1, 0x30, 0x2f, 0x1f, 0x87, 0x97, 0x1d, 0xf4, 0x73, 0xb8, 0x30, 0x86, 0x40, 0x9e,
  2990. 0xe9, 0xc4, 0x82, 0x40, 0xf4, 0x52, 0x18, 0x88, 0x5c, 0xcb, 0xbe, 0xaf, 0x92, 0xdf, 0x31, 0x36,
  2991. 0x76, 0x68, 0x31, 0x14, 0x64, 0x0c, 0x53, 0xbf, 0xfe, 0x35, 0x28, 0x0c, 0x31, 0xa1, 0xf5, 0x79,
  2992. 0xa8, 0xdc, 0x5c, 0xe6, 0x8b, 0xa2, 0x88, 0x3d, 0x80, 0x97, 0xa6, 0x32, 0x07, 0xf4, 0x23, 0xc8,
  2993. 0xfb, 0xa4, 0x23, 0x1e, 0x51, 0xb9, 0x79, 0xd5, 0x88, 0x2f, 0x2b, 0xff, 0x39, 0xee, 0x9b, 0x0c,
  2994. 0xd7, 0x37, 0x75, 0xc8, 0x0c, 0xb1, 0x33, 0xea, 0xf3, 0x8a, 0xa3, 0xb8, 0xf5, 0xc6, 0x62, 0x9c,
  2995. 0x83, 0xae, 0x8e, 0xfa, 0x44, 0x11, 0xca, 0xf2, 0x63, 0xc8, 0xf0, 0x15, 0xb4, 0x04, 0xd9, 0x87,
  2996. 0xfb, 0xbb, 0xfb, 0xcd, 0x0f, 0xf7, 0xcb, 0x31, 0x04, 0x90, 0xd9, 0xae, 0xd5, 0xea, 0x07, 0xad,
  2997. 0x72, 0x1c, 0xe5, 0x21, 0xbd, 0x5d, 0x6d, 0x2a, 0xad, 0x72, 0x82, 0x2e, 0x2b, 0xf5, 0xf7, 0xeb,
  2998. 0xb5, 0x56, 0x39, 0x89, 0x56, 0xa0, 0xc0, 0xc7, 0xea, 0x83, 0xa6, 0xf2, 0xc1, 0x76, 0xab, 0x9c,
  2999. 0x0a, 0x2c, 0x1d, 0xd6, 0xf7, 0xef, 0xd7, 0x95, 0x72, 0x5a, 0x7e, 0x93, 0x96, 0x34, 0x11, 0x2c,
  3000. 0xc5, 0x2f, 0x5e, 0xe2, 0x81, 0xe2, 0x45, 0xfe, 0x63, 0x02, 0xa4, 0x68, 0xea, 0x81, 0xde, 0x1f,
  3001. 0xdb, 0xf8, 0xd6, 0x19, 0x78, 0xcb, 0xd8, 0xee, 0xd1, 0x75, 0x28, 0x0e, 0xf1, 0x11, 0x26, 0x9d,
  3002. 0x1e, 0xa7, 0x42, 0x3c, 0xb1, 0x15, 0x94, 0x82, 0x58, 0x65, 0x4a, 0x0e, 0x17, 0xfb, 0x04, 0x77,
  3003. 0x88, 0xca, 0xeb, 0x28, 0x7e, 0xe8, 0xf2, 0x54, 0x8c, 0xae, 0x1e, 0xf2, 0x45, 0xf9, 0xe3, 0x33,
  3004. 0xf9, 0x32, 0x0f, 0x69, 0xa5, 0xde, 0x52, 0x7e, 0x51, 0x4e, 0x22, 0x04, 0x45, 0x36, 0x54, 0x0f,
  3005. 0xf7, 0xb7, 0x0f, 0x0e, 0x1b, 0x4d, 0xea, 0xcb, 0x73, 0x50, 0x72, 0x7d, 0xe9, 0x2e, 0xa6, 0xe5,
  3006. 0xff, 0xc6, 0xa1, 0x34, 0x16, 0x20, 0x68, 0x0b, 0xd2, 0x9c, 0x4e, 0x47, 0x35, 0xdd, 0x59, 0x7c,
  3007. 0x8b, 0x68, 0xe2, 0xa2, 0xe8, 0x6d, 0xc8, 0x61, 0xd1, 0x27, 0x98, 0x16, 0x88, 0xbc, 0xbf, 0xe1,
  3008. 0x76, 0x12, 0x84, 0xaa, 0xa7, 0x81, 0xde, 0x81, 0xbc, 0x17, 0xe9, 0xa2, 0x86, 0x7b, 0x79, 0x52,
  3009. 0xdd, 0xc3, 0x08, 0xa1, 0xef, 0xeb, 0xa0, 0x7b, 0x3e, 0x27, 0x4b, 0x4d, 0x92, 0x78, 0xa1, 0xce,
  3010. 0x05, 0x84, 0xb2, 0x2b, 0x2f, 0xd7, 0x60, 0x29, 0xb0, 0x1f, 0x74, 0x09, 0xf2, 0x03, 0xed, 0x44,
  3011. 0xf4, 0x9f, 0x78, 0x07, 0x21, 0x37, 0xd0, 0x4e, 0x78, 0xeb, 0xe9, 0x02, 0x64, 0xe9, 0xc3, 0xae,
  3012. 0xc6, 0xd1, 0x26, 0xa9, 0x64, 0x06, 0xda, 0xc9, 0x7b, 0x9a, 0x23, 0x7f, 0x04, 0xc5, 0x70, 0xef,
  3013. 0x85, 0x9e, 0xc4, 0xa1, 0x35, 0x32, 0x75, 0x66, 0x23, 0xad, 0xf0, 0x09, 0xba, 0x0d, 0xe9, 0x63,
  3014. 0x8b, 0x83, 0xd5, 0xf4, 0x90, 0x7d, 0x64, 0x11, 0x1c, 0xe8, 0xdd, 0x70, 0x69, 0xf9, 0x33, 0x48,
  3015. 0x33, 0xf0, 0xa1, 0x40, 0xc2, 0xba, 0x28, 0x82, 0x8f, 0xd2, 0x31, 0xfa, 0x08, 0x40, 0x23, 0x64,
  3016. 0x68, 0xb4, 0x47, 0xbe, 0xe1, 0xf5, 0xe9, 0xe0, 0xb5, 0xed, 0xca, 0x55, 0x2f, 0x0b, 0x14, 0x5b,
  3017. 0xf5, 0x55, 0x03, 0x48, 0x16, 0x30, 0x28, 0xef, 0x43, 0x31, 0xac, 0x1b, 0xec, 0x67, 0x2e, 0x4f,
  3018. 0xe9, 0x67, 0x7a, 0x9c, 0xc7, 0x63, 0x4c, 0x49, 0xde, 0x31, 0x63, 0x13, 0xf9, 0x59, 0x1c, 0x72,
  3019. 0xad, 0x13, 0x71, 0xac, 0x23, 0x9a, 0x35, 0xbe, 0x6a, 0x22, 0xd8, 0x9a, 0xe0, 0xdd, 0x9f, 0xa4,
  3020. 0xd7, 0x53, 0x7a, 0xd7, 0x0b, 0xdc, 0xd4, 0xa2, 0xc5, 0xa3, 0xdb, 0x5c, 0x13, 0x60, 0xf5, 0x16,
  3021. 0xe4, 0xbd, 0x53, 0x45, 0x89, 0xbd, 0xa6, 0xeb, 0x43, 0xec, 0x38, 0x62, 0x6f, 0xee, 0x94, 0xf5,
  3022. 0xfe, 0xac, 0xa7, 0xa2, 0xf9, 0x91, 0x54, 0xf8, 0x44, 0xd6, 0xa1, 0x34, 0x96, 0xb6, 0xd0, 0x5b,
  3023. 0x90, 0xb5, 0x47, 0x6d, 0xd5, 0x75, 0xcf, 0x58, 0xf0, 0xb8, 0x24, 0x6f, 0xd4, 0xee, 0x1b, 0x9d,
  3024. 0x5d, 0x7c, 0xea, 0xfe, 0x18, 0x7b, 0xd4, 0xde, 0xe5, 0x5e, 0xe4, 0x6f, 0x49, 0x04, 0xdf, 0x72,
  3025. 0x0c, 0x39, 0xf7, 0x50, 0xa0, 0x9f, 0x06, 0xe3, 0xc4, 0xed, 0x08, 0x47, 0xa6, 0x52, 0x61, 0x3e,
  3026. 0x10, 0x26, 0x37, 0x61, 0xc5, 0x31, 0xba, 0x26, 0xd6, 0x55, 0xbf, 0xb4, 0x60, 0x6f, 0xcb, 0x29,
  3027. 0x25, 0xfe, 0x60, 0xcf, 0xad, 0x2b, 0xe4, 0xff, 0xc4, 0x21, 0xe7, 0x06, 0x2c, 0x7a, 0x33, 0x70,
  3028. 0xee, 0x8a, 0x53, 0x1a, 0x25, 0xae, 0xa0, 0xdf, 0xbe, 0x0b, 0xff, 0xd6, 0xc4, 0xd9, 0x7f, 0x6b,
  3029. 0x54, 0x1f, 0xd6, 0x6d, 0x88, 0xa7, 0xce, 0xdc, 0x10, 0x7f, 0x1d, 0x10, 0xb1, 0x88, 0xd6, 0x57,
  3030. 0x8f, 0x2d, 0x62, 0x98, 0x5d, 0x95, 0x3b, 0x9b, 0x33, 0xaa, 0x32, 0x7b, 0xf2, 0x88, 0x3d, 0x38,
  3031. 0x60, 0x7e, 0xff, 0x4d, 0x1c, 0x72, 0x5e, 0x6e, 0x3c, 0x6b, 0x37, 0xee, 0x3c, 0x64, 0x04, 0xfc,
  3032. 0xf3, 0x76, 0x9c, 0x98, 0x79, 0x8d, 0xe1, 0x54, 0xa0, 0x31, 0x2c, 0x41, 0x6e, 0x80, 0x89, 0xc6,
  3033. 0x08, 0x02, 0xaf, 0xee, 0xbc, 0xf9, 0xcd, 0x7b, 0xb0, 0x14, 0x68, 0x8c, 0xd2, 0xc8, 0xdb, 0xaf,
  3034. 0x7f, 0x58, 0x8e, 0x49, 0xd9, 0x67, 0x5f, 0x5e, 0x4d, 0xee, 0xe3, 0xa7, 0xf4, 0xcc, 0x2a, 0xf5,
  3035. 0x5a, 0xa3, 0x5e, 0xdb, 0x2d, 0xc7, 0xa5, 0xa5, 0x67, 0x5f, 0x5e, 0xcd, 0x2a, 0x98, 0xf5, 0x57,
  3036. 0x6e, 0x36, 0x60, 0x39, 0xf8, 0x55, 0xc2, 0x19, 0x04, 0x41, 0xf1, 0xfe, 0xc3, 0x83, 0xbd, 0x9d,
  3037. 0xda, 0x76, 0xab, 0xae, 0x3e, 0x6a, 0xb6, 0xea, 0xe5, 0x38, 0xba, 0x00, 0xe7, 0xf6, 0x76, 0xde,
  3038. 0x6b, 0xb4, 0xd4, 0xda, 0xde, 0x4e, 0x7d, 0xbf, 0xa5, 0x6e, 0xb7, 0x5a, 0xdb, 0xb5, 0xdd, 0x72,
  3039. 0x62, 0xeb, 0x73, 0x80, 0xd2, 0x76, 0xb5, 0xb6, 0x43, 0xb3, 0x9f, 0xd1, 0xd1, 0x44, 0xff, 0x2a,
  3040. 0xc5, 0x8a, 0xeb, 0x99, 0x37, 0xb2, 0xd2, 0xec, 0xf6, 0x1d, 0x7a, 0x00, 0x69, 0x56, 0x77, 0xa3,
  3041. 0xd9, 0x57, 0xb4, 0xd2, 0x9c, 0x7e, 0x1e, 0xfd, 0x31, 0x2c, 0x3c, 0x66, 0xde, 0xd9, 0x4a, 0xb3,
  3042. 0xdb, 0x7b, 0x48, 0x81, 0xbc, 0x5f, 0x38, 0xcf, 0xbf, 0xc3, 0x95, 0x16, 0x68, 0xf9, 0x51, 0x9b,
  3043. 0x7e, 0x59, 0x30, 0xff, 0x4e, 0x53, 0x5a, 0x00, 0xc0, 0xd0, 0x1e, 0x64, 0xdd, 0x82, 0x6b, 0xde,
  3044. 0x2d, 0xab, 0x34, 0xb7, 0x1d, 0x47, 0x3f, 0x01, 0x2f, 0x8c, 0x67, 0x5f, 0x19, 0x4b, 0x73, 0x7a,
  3045. 0x8b, 0x68, 0x07, 0x32, 0x82, 0xeb, 0xce, 0xb9, 0x39, 0x95, 0xe6, 0xb5, 0xd7, 0xa8, 0xd3, 0xfc,
  3046. 0x8e, 0xc3, 0xfc, 0x8b, 0x70, 0x69, 0x81, 0xb6, 0x29, 0x7a, 0x08, 0x10, 0x28, 0x83, 0x17, 0xb8,
  3047. 0xe1, 0x96, 0x16, 0x69, 0x87, 0xa2, 0x26, 0xe4, 0xbc, 0x72, 0x67, 0xee, 0x7d, 0xb3, 0x34, 0xbf,
  3048. 0x2f, 0x89, 0x1e, 0x43, 0x21, 0xcc, 0xf3, 0x17, 0xbb, 0x45, 0x96, 0x16, 0x6c, 0x38, 0x52, 0xfb,
  3049. 0x61, 0xd2, 0xbf, 0xd8, 0xad, 0xb2, 0xb4, 0x60, 0xff, 0x11, 0x7d, 0x02, 0x2b, 0x93, 0xa4, 0x7c,
  3050. 0xf1, 0x4b, 0x66, 0xe9, 0x0c, 0x1d, 0x49, 0x34, 0x00, 0x34, 0x85, 0xcc, 0x9f, 0xe1, 0xce, 0x59,
  3051. 0x3a, 0x4b, 0x83, 0xb2, 0x5a, 0xff, 0xea, 0xf9, 0x5a, 0xfc, 0xeb, 0xe7, 0x6b, 0xf1, 0x7f, 0x3c,
  3052. 0x5f, 0x8b, 0x7f, 0xf1, 0x62, 0x2d, 0xf6, 0xf5, 0x8b, 0xb5, 0xd8, 0xdf, 0x5e, 0xac, 0xc5, 0x7e,
  3053. 0xf9, 0x5a, 0xd7, 0x20, 0xbd, 0x51, 0x7b, 0xa3, 0x63, 0x0d, 0x36, 0x83, 0x7f, 0x88, 0x99, 0xf6,
  3054. 0x27, 0x9d, 0x76, 0x86, 0x25, 0xaa, 0x5b, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xae, 0x48,
  3055. 0xb4, 0xc4, 0x23, 0x00, 0x00,
  3056. }
  3057. // Reference imports to suppress errors if they are not otherwise used.
  3058. var _ context.Context
  3059. var _ grpc.ClientConn
  3060. // This is a compile-time assertion to ensure that this generated file
  3061. // is compatible with the grpc package it is being compiled against.
  3062. const _ = grpc.SupportPackageIsVersion4
  3063. // ABCIApplicationClient is the client API for ABCIApplication service.
  3064. //
  3065. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  3066. type ABCIApplicationClient interface {
  3067. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  3068. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  3069. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  3070. SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error)
  3071. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  3072. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  3073. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  3074. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  3075. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  3076. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  3077. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  3078. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  3079. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  3080. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  3081. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  3082. }
  3083. type aBCIApplicationClient struct {
  3084. cc *grpc.ClientConn
  3085. }
  3086. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  3087. return &aBCIApplicationClient{cc}
  3088. }
  3089. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  3090. out := new(ResponseEcho)
  3091. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  3092. if err != nil {
  3093. return nil, err
  3094. }
  3095. return out, nil
  3096. }
  3097. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  3098. out := new(ResponseFlush)
  3099. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  3100. if err != nil {
  3101. return nil, err
  3102. }
  3103. return out, nil
  3104. }
  3105. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  3106. out := new(ResponseInfo)
  3107. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  3108. if err != nil {
  3109. return nil, err
  3110. }
  3111. return out, nil
  3112. }
  3113. func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) {
  3114. out := new(ResponseSetOption)
  3115. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/SetOption", in, out, opts...)
  3116. if err != nil {
  3117. return nil, err
  3118. }
  3119. return out, nil
  3120. }
  3121. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  3122. out := new(ResponseDeliverTx)
  3123. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  3124. if err != nil {
  3125. return nil, err
  3126. }
  3127. return out, nil
  3128. }
  3129. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  3130. out := new(ResponseCheckTx)
  3131. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  3132. if err != nil {
  3133. return nil, err
  3134. }
  3135. return out, nil
  3136. }
  3137. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  3138. out := new(ResponseQuery)
  3139. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  3140. if err != nil {
  3141. return nil, err
  3142. }
  3143. return out, nil
  3144. }
  3145. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  3146. out := new(ResponseCommit)
  3147. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  3148. if err != nil {
  3149. return nil, err
  3150. }
  3151. return out, nil
  3152. }
  3153. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  3154. out := new(ResponseInitChain)
  3155. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  3156. if err != nil {
  3157. return nil, err
  3158. }
  3159. return out, nil
  3160. }
  3161. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  3162. out := new(ResponseBeginBlock)
  3163. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  3164. if err != nil {
  3165. return nil, err
  3166. }
  3167. return out, nil
  3168. }
  3169. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  3170. out := new(ResponseEndBlock)
  3171. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  3172. if err != nil {
  3173. return nil, err
  3174. }
  3175. return out, nil
  3176. }
  3177. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  3178. out := new(ResponseListSnapshots)
  3179. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  3180. if err != nil {
  3181. return nil, err
  3182. }
  3183. return out, nil
  3184. }
  3185. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  3186. out := new(ResponseOfferSnapshot)
  3187. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  3188. if err != nil {
  3189. return nil, err
  3190. }
  3191. return out, nil
  3192. }
  3193. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  3194. out := new(ResponseLoadSnapshotChunk)
  3195. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  3196. if err != nil {
  3197. return nil, err
  3198. }
  3199. return out, nil
  3200. }
  3201. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  3202. out := new(ResponseApplySnapshotChunk)
  3203. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  3204. if err != nil {
  3205. return nil, err
  3206. }
  3207. return out, nil
  3208. }
  3209. // ABCIApplicationServer is the server API for ABCIApplication service.
  3210. type ABCIApplicationServer interface {
  3211. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  3212. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  3213. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  3214. SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error)
  3215. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  3216. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  3217. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  3218. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  3219. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  3220. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  3221. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  3222. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  3223. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  3224. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  3225. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  3226. }
  3227. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  3228. type UnimplementedABCIApplicationServer struct {
  3229. }
  3230. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3231. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3232. }
  3233. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3234. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3235. }
  3236. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3237. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3238. }
  3239. func (*UnimplementedABCIApplicationServer) SetOption(ctx context.Context, req *RequestSetOption) (*ResponseSetOption, error) {
  3240. return nil, status.Errorf(codes.Unimplemented, "method SetOption not implemented")
  3241. }
  3242. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3243. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3244. }
  3245. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3246. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3247. }
  3248. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3249. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3250. }
  3251. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3252. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3253. }
  3254. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3255. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3256. }
  3257. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3258. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3259. }
  3260. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3261. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3262. }
  3263. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3264. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3265. }
  3266. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3267. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3268. }
  3269. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3270. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3271. }
  3272. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3273. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3274. }
  3275. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3276. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3277. }
  3278. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3279. in := new(RequestEcho)
  3280. if err := dec(in); err != nil {
  3281. return nil, err
  3282. }
  3283. if interceptor == nil {
  3284. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3285. }
  3286. info := &grpc.UnaryServerInfo{
  3287. Server: srv,
  3288. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3289. }
  3290. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3291. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3292. }
  3293. return interceptor(ctx, in, info, handler)
  3294. }
  3295. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3296. in := new(RequestFlush)
  3297. if err := dec(in); err != nil {
  3298. return nil, err
  3299. }
  3300. if interceptor == nil {
  3301. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3302. }
  3303. info := &grpc.UnaryServerInfo{
  3304. Server: srv,
  3305. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3306. }
  3307. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3308. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3309. }
  3310. return interceptor(ctx, in, info, handler)
  3311. }
  3312. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3313. in := new(RequestInfo)
  3314. if err := dec(in); err != nil {
  3315. return nil, err
  3316. }
  3317. if interceptor == nil {
  3318. return srv.(ABCIApplicationServer).Info(ctx, in)
  3319. }
  3320. info := &grpc.UnaryServerInfo{
  3321. Server: srv,
  3322. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3323. }
  3324. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3325. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3326. }
  3327. return interceptor(ctx, in, info, handler)
  3328. }
  3329. func _ABCIApplication_SetOption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3330. in := new(RequestSetOption)
  3331. if err := dec(in); err != nil {
  3332. return nil, err
  3333. }
  3334. if interceptor == nil {
  3335. return srv.(ABCIApplicationServer).SetOption(ctx, in)
  3336. }
  3337. info := &grpc.UnaryServerInfo{
  3338. Server: srv,
  3339. FullMethod: "/tendermint.abci.ABCIApplication/SetOption",
  3340. }
  3341. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3342. return srv.(ABCIApplicationServer).SetOption(ctx, req.(*RequestSetOption))
  3343. }
  3344. return interceptor(ctx, in, info, handler)
  3345. }
  3346. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3347. in := new(RequestDeliverTx)
  3348. if err := dec(in); err != nil {
  3349. return nil, err
  3350. }
  3351. if interceptor == nil {
  3352. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3353. }
  3354. info := &grpc.UnaryServerInfo{
  3355. Server: srv,
  3356. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3357. }
  3358. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3359. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3360. }
  3361. return interceptor(ctx, in, info, handler)
  3362. }
  3363. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3364. in := new(RequestCheckTx)
  3365. if err := dec(in); err != nil {
  3366. return nil, err
  3367. }
  3368. if interceptor == nil {
  3369. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3370. }
  3371. info := &grpc.UnaryServerInfo{
  3372. Server: srv,
  3373. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3374. }
  3375. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3376. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3377. }
  3378. return interceptor(ctx, in, info, handler)
  3379. }
  3380. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3381. in := new(RequestQuery)
  3382. if err := dec(in); err != nil {
  3383. return nil, err
  3384. }
  3385. if interceptor == nil {
  3386. return srv.(ABCIApplicationServer).Query(ctx, in)
  3387. }
  3388. info := &grpc.UnaryServerInfo{
  3389. Server: srv,
  3390. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3391. }
  3392. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3393. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3394. }
  3395. return interceptor(ctx, in, info, handler)
  3396. }
  3397. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3398. in := new(RequestCommit)
  3399. if err := dec(in); err != nil {
  3400. return nil, err
  3401. }
  3402. if interceptor == nil {
  3403. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3404. }
  3405. info := &grpc.UnaryServerInfo{
  3406. Server: srv,
  3407. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3408. }
  3409. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3410. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3411. }
  3412. return interceptor(ctx, in, info, handler)
  3413. }
  3414. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3415. in := new(RequestInitChain)
  3416. if err := dec(in); err != nil {
  3417. return nil, err
  3418. }
  3419. if interceptor == nil {
  3420. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3421. }
  3422. info := &grpc.UnaryServerInfo{
  3423. Server: srv,
  3424. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3425. }
  3426. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3427. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3428. }
  3429. return interceptor(ctx, in, info, handler)
  3430. }
  3431. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3432. in := new(RequestBeginBlock)
  3433. if err := dec(in); err != nil {
  3434. return nil, err
  3435. }
  3436. if interceptor == nil {
  3437. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3438. }
  3439. info := &grpc.UnaryServerInfo{
  3440. Server: srv,
  3441. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3442. }
  3443. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3444. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3445. }
  3446. return interceptor(ctx, in, info, handler)
  3447. }
  3448. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3449. in := new(RequestEndBlock)
  3450. if err := dec(in); err != nil {
  3451. return nil, err
  3452. }
  3453. if interceptor == nil {
  3454. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3455. }
  3456. info := &grpc.UnaryServerInfo{
  3457. Server: srv,
  3458. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3459. }
  3460. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3461. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3462. }
  3463. return interceptor(ctx, in, info, handler)
  3464. }
  3465. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3466. in := new(RequestListSnapshots)
  3467. if err := dec(in); err != nil {
  3468. return nil, err
  3469. }
  3470. if interceptor == nil {
  3471. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3472. }
  3473. info := &grpc.UnaryServerInfo{
  3474. Server: srv,
  3475. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3476. }
  3477. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3478. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3479. }
  3480. return interceptor(ctx, in, info, handler)
  3481. }
  3482. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3483. in := new(RequestOfferSnapshot)
  3484. if err := dec(in); err != nil {
  3485. return nil, err
  3486. }
  3487. if interceptor == nil {
  3488. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3489. }
  3490. info := &grpc.UnaryServerInfo{
  3491. Server: srv,
  3492. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3493. }
  3494. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3495. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3496. }
  3497. return interceptor(ctx, in, info, handler)
  3498. }
  3499. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3500. in := new(RequestLoadSnapshotChunk)
  3501. if err := dec(in); err != nil {
  3502. return nil, err
  3503. }
  3504. if interceptor == nil {
  3505. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3506. }
  3507. info := &grpc.UnaryServerInfo{
  3508. Server: srv,
  3509. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3510. }
  3511. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3512. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3513. }
  3514. return interceptor(ctx, in, info, handler)
  3515. }
  3516. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3517. in := new(RequestApplySnapshotChunk)
  3518. if err := dec(in); err != nil {
  3519. return nil, err
  3520. }
  3521. if interceptor == nil {
  3522. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3523. }
  3524. info := &grpc.UnaryServerInfo{
  3525. Server: srv,
  3526. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3527. }
  3528. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3529. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3530. }
  3531. return interceptor(ctx, in, info, handler)
  3532. }
  3533. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3534. ServiceName: "tendermint.abci.ABCIApplication",
  3535. HandlerType: (*ABCIApplicationServer)(nil),
  3536. Methods: []grpc.MethodDesc{
  3537. {
  3538. MethodName: "Echo",
  3539. Handler: _ABCIApplication_Echo_Handler,
  3540. },
  3541. {
  3542. MethodName: "Flush",
  3543. Handler: _ABCIApplication_Flush_Handler,
  3544. },
  3545. {
  3546. MethodName: "Info",
  3547. Handler: _ABCIApplication_Info_Handler,
  3548. },
  3549. {
  3550. MethodName: "SetOption",
  3551. Handler: _ABCIApplication_SetOption_Handler,
  3552. },
  3553. {
  3554. MethodName: "DeliverTx",
  3555. Handler: _ABCIApplication_DeliverTx_Handler,
  3556. },
  3557. {
  3558. MethodName: "CheckTx",
  3559. Handler: _ABCIApplication_CheckTx_Handler,
  3560. },
  3561. {
  3562. MethodName: "Query",
  3563. Handler: _ABCIApplication_Query_Handler,
  3564. },
  3565. {
  3566. MethodName: "Commit",
  3567. Handler: _ABCIApplication_Commit_Handler,
  3568. },
  3569. {
  3570. MethodName: "InitChain",
  3571. Handler: _ABCIApplication_InitChain_Handler,
  3572. },
  3573. {
  3574. MethodName: "BeginBlock",
  3575. Handler: _ABCIApplication_BeginBlock_Handler,
  3576. },
  3577. {
  3578. MethodName: "EndBlock",
  3579. Handler: _ABCIApplication_EndBlock_Handler,
  3580. },
  3581. {
  3582. MethodName: "ListSnapshots",
  3583. Handler: _ABCIApplication_ListSnapshots_Handler,
  3584. },
  3585. {
  3586. MethodName: "OfferSnapshot",
  3587. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3588. },
  3589. {
  3590. MethodName: "LoadSnapshotChunk",
  3591. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3592. },
  3593. {
  3594. MethodName: "ApplySnapshotChunk",
  3595. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3596. },
  3597. },
  3598. Streams: []grpc.StreamDesc{},
  3599. Metadata: "tendermint/abci/types.proto",
  3600. }
  3601. func (m *Request) Marshal() (dAtA []byte, err error) {
  3602. size := m.Size()
  3603. dAtA = make([]byte, size)
  3604. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3605. if err != nil {
  3606. return nil, err
  3607. }
  3608. return dAtA[:n], nil
  3609. }
  3610. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3611. size := m.Size()
  3612. return m.MarshalToSizedBuffer(dAtA[:size])
  3613. }
  3614. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3615. i := len(dAtA)
  3616. _ = i
  3617. var l int
  3618. _ = l
  3619. if m.Value != nil {
  3620. {
  3621. size := m.Value.Size()
  3622. i -= size
  3623. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3624. return 0, err
  3625. }
  3626. }
  3627. }
  3628. return len(dAtA) - i, nil
  3629. }
  3630. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3631. size := m.Size()
  3632. return m.MarshalToSizedBuffer(dAtA[:size])
  3633. }
  3634. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3635. i := len(dAtA)
  3636. if m.Echo != nil {
  3637. {
  3638. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3639. if err != nil {
  3640. return 0, err
  3641. }
  3642. i -= size
  3643. i = encodeVarintTypes(dAtA, i, uint64(size))
  3644. }
  3645. i--
  3646. dAtA[i] = 0xa
  3647. }
  3648. return len(dAtA) - i, nil
  3649. }
  3650. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3651. size := m.Size()
  3652. return m.MarshalToSizedBuffer(dAtA[:size])
  3653. }
  3654. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3655. i := len(dAtA)
  3656. if m.Flush != nil {
  3657. {
  3658. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3659. if err != nil {
  3660. return 0, err
  3661. }
  3662. i -= size
  3663. i = encodeVarintTypes(dAtA, i, uint64(size))
  3664. }
  3665. i--
  3666. dAtA[i] = 0x12
  3667. }
  3668. return len(dAtA) - i, nil
  3669. }
  3670. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3671. size := m.Size()
  3672. return m.MarshalToSizedBuffer(dAtA[:size])
  3673. }
  3674. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3675. i := len(dAtA)
  3676. if m.Info != nil {
  3677. {
  3678. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3679. if err != nil {
  3680. return 0, err
  3681. }
  3682. i -= size
  3683. i = encodeVarintTypes(dAtA, i, uint64(size))
  3684. }
  3685. i--
  3686. dAtA[i] = 0x1a
  3687. }
  3688. return len(dAtA) - i, nil
  3689. }
  3690. func (m *Request_SetOption) MarshalTo(dAtA []byte) (int, error) {
  3691. size := m.Size()
  3692. return m.MarshalToSizedBuffer(dAtA[:size])
  3693. }
  3694. func (m *Request_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3695. i := len(dAtA)
  3696. if m.SetOption != nil {
  3697. {
  3698. size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i])
  3699. if err != nil {
  3700. return 0, err
  3701. }
  3702. i -= size
  3703. i = encodeVarintTypes(dAtA, i, uint64(size))
  3704. }
  3705. i--
  3706. dAtA[i] = 0x22
  3707. }
  3708. return len(dAtA) - i, nil
  3709. }
  3710. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3711. size := m.Size()
  3712. return m.MarshalToSizedBuffer(dAtA[:size])
  3713. }
  3714. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3715. i := len(dAtA)
  3716. if m.InitChain != nil {
  3717. {
  3718. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3719. if err != nil {
  3720. return 0, err
  3721. }
  3722. i -= size
  3723. i = encodeVarintTypes(dAtA, i, uint64(size))
  3724. }
  3725. i--
  3726. dAtA[i] = 0x2a
  3727. }
  3728. return len(dAtA) - i, nil
  3729. }
  3730. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3731. size := m.Size()
  3732. return m.MarshalToSizedBuffer(dAtA[:size])
  3733. }
  3734. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3735. i := len(dAtA)
  3736. if m.Query != nil {
  3737. {
  3738. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3739. if err != nil {
  3740. return 0, err
  3741. }
  3742. i -= size
  3743. i = encodeVarintTypes(dAtA, i, uint64(size))
  3744. }
  3745. i--
  3746. dAtA[i] = 0x32
  3747. }
  3748. return len(dAtA) - i, nil
  3749. }
  3750. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3751. size := m.Size()
  3752. return m.MarshalToSizedBuffer(dAtA[:size])
  3753. }
  3754. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3755. i := len(dAtA)
  3756. if m.BeginBlock != nil {
  3757. {
  3758. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3759. if err != nil {
  3760. return 0, err
  3761. }
  3762. i -= size
  3763. i = encodeVarintTypes(dAtA, i, uint64(size))
  3764. }
  3765. i--
  3766. dAtA[i] = 0x3a
  3767. }
  3768. return len(dAtA) - i, nil
  3769. }
  3770. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3771. size := m.Size()
  3772. return m.MarshalToSizedBuffer(dAtA[:size])
  3773. }
  3774. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3775. i := len(dAtA)
  3776. if m.CheckTx != nil {
  3777. {
  3778. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3779. if err != nil {
  3780. return 0, err
  3781. }
  3782. i -= size
  3783. i = encodeVarintTypes(dAtA, i, uint64(size))
  3784. }
  3785. i--
  3786. dAtA[i] = 0x42
  3787. }
  3788. return len(dAtA) - i, nil
  3789. }
  3790. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3791. size := m.Size()
  3792. return m.MarshalToSizedBuffer(dAtA[:size])
  3793. }
  3794. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3795. i := len(dAtA)
  3796. if m.DeliverTx != nil {
  3797. {
  3798. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3799. if err != nil {
  3800. return 0, err
  3801. }
  3802. i -= size
  3803. i = encodeVarintTypes(dAtA, i, uint64(size))
  3804. }
  3805. i--
  3806. dAtA[i] = 0x4a
  3807. }
  3808. return len(dAtA) - i, nil
  3809. }
  3810. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3811. size := m.Size()
  3812. return m.MarshalToSizedBuffer(dAtA[:size])
  3813. }
  3814. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3815. i := len(dAtA)
  3816. if m.EndBlock != nil {
  3817. {
  3818. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3819. if err != nil {
  3820. return 0, err
  3821. }
  3822. i -= size
  3823. i = encodeVarintTypes(dAtA, i, uint64(size))
  3824. }
  3825. i--
  3826. dAtA[i] = 0x52
  3827. }
  3828. return len(dAtA) - i, nil
  3829. }
  3830. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3831. size := m.Size()
  3832. return m.MarshalToSizedBuffer(dAtA[:size])
  3833. }
  3834. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3835. i := len(dAtA)
  3836. if m.Commit != nil {
  3837. {
  3838. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3839. if err != nil {
  3840. return 0, err
  3841. }
  3842. i -= size
  3843. i = encodeVarintTypes(dAtA, i, uint64(size))
  3844. }
  3845. i--
  3846. dAtA[i] = 0x5a
  3847. }
  3848. return len(dAtA) - i, nil
  3849. }
  3850. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3851. size := m.Size()
  3852. return m.MarshalToSizedBuffer(dAtA[:size])
  3853. }
  3854. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3855. i := len(dAtA)
  3856. if m.ListSnapshots != nil {
  3857. {
  3858. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3859. if err != nil {
  3860. return 0, err
  3861. }
  3862. i -= size
  3863. i = encodeVarintTypes(dAtA, i, uint64(size))
  3864. }
  3865. i--
  3866. dAtA[i] = 0x62
  3867. }
  3868. return len(dAtA) - i, nil
  3869. }
  3870. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3871. size := m.Size()
  3872. return m.MarshalToSizedBuffer(dAtA[:size])
  3873. }
  3874. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3875. i := len(dAtA)
  3876. if m.OfferSnapshot != nil {
  3877. {
  3878. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3879. if err != nil {
  3880. return 0, err
  3881. }
  3882. i -= size
  3883. i = encodeVarintTypes(dAtA, i, uint64(size))
  3884. }
  3885. i--
  3886. dAtA[i] = 0x6a
  3887. }
  3888. return len(dAtA) - i, nil
  3889. }
  3890. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3891. size := m.Size()
  3892. return m.MarshalToSizedBuffer(dAtA[:size])
  3893. }
  3894. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3895. i := len(dAtA)
  3896. if m.LoadSnapshotChunk != nil {
  3897. {
  3898. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3899. if err != nil {
  3900. return 0, err
  3901. }
  3902. i -= size
  3903. i = encodeVarintTypes(dAtA, i, uint64(size))
  3904. }
  3905. i--
  3906. dAtA[i] = 0x72
  3907. }
  3908. return len(dAtA) - i, nil
  3909. }
  3910. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3911. size := m.Size()
  3912. return m.MarshalToSizedBuffer(dAtA[:size])
  3913. }
  3914. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3915. i := len(dAtA)
  3916. if m.ApplySnapshotChunk != nil {
  3917. {
  3918. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3919. if err != nil {
  3920. return 0, err
  3921. }
  3922. i -= size
  3923. i = encodeVarintTypes(dAtA, i, uint64(size))
  3924. }
  3925. i--
  3926. dAtA[i] = 0x7a
  3927. }
  3928. return len(dAtA) - i, nil
  3929. }
  3930. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3931. size := m.Size()
  3932. dAtA = make([]byte, size)
  3933. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3934. if err != nil {
  3935. return nil, err
  3936. }
  3937. return dAtA[:n], nil
  3938. }
  3939. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3940. size := m.Size()
  3941. return m.MarshalToSizedBuffer(dAtA[:size])
  3942. }
  3943. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3944. i := len(dAtA)
  3945. _ = i
  3946. var l int
  3947. _ = l
  3948. if len(m.Message) > 0 {
  3949. i -= len(m.Message)
  3950. copy(dAtA[i:], m.Message)
  3951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3952. i--
  3953. dAtA[i] = 0xa
  3954. }
  3955. return len(dAtA) - i, nil
  3956. }
  3957. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3958. size := m.Size()
  3959. dAtA = make([]byte, size)
  3960. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3961. if err != nil {
  3962. return nil, err
  3963. }
  3964. return dAtA[:n], nil
  3965. }
  3966. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3967. size := m.Size()
  3968. return m.MarshalToSizedBuffer(dAtA[:size])
  3969. }
  3970. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3971. i := len(dAtA)
  3972. _ = i
  3973. var l int
  3974. _ = l
  3975. return len(dAtA) - i, nil
  3976. }
  3977. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3978. size := m.Size()
  3979. dAtA = make([]byte, size)
  3980. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3981. if err != nil {
  3982. return nil, err
  3983. }
  3984. return dAtA[:n], nil
  3985. }
  3986. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3987. size := m.Size()
  3988. return m.MarshalToSizedBuffer(dAtA[:size])
  3989. }
  3990. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3991. i := len(dAtA)
  3992. _ = i
  3993. var l int
  3994. _ = l
  3995. if m.P2PVersion != 0 {
  3996. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3997. i--
  3998. dAtA[i] = 0x18
  3999. }
  4000. if m.BlockVersion != 0 {
  4001. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  4002. i--
  4003. dAtA[i] = 0x10
  4004. }
  4005. if len(m.Version) > 0 {
  4006. i -= len(m.Version)
  4007. copy(dAtA[i:], m.Version)
  4008. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4009. i--
  4010. dAtA[i] = 0xa
  4011. }
  4012. return len(dAtA) - i, nil
  4013. }
  4014. func (m *RequestSetOption) Marshal() (dAtA []byte, err error) {
  4015. size := m.Size()
  4016. dAtA = make([]byte, size)
  4017. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4018. if err != nil {
  4019. return nil, err
  4020. }
  4021. return dAtA[:n], nil
  4022. }
  4023. func (m *RequestSetOption) MarshalTo(dAtA []byte) (int, error) {
  4024. size := m.Size()
  4025. return m.MarshalToSizedBuffer(dAtA[:size])
  4026. }
  4027. func (m *RequestSetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4028. i := len(dAtA)
  4029. _ = i
  4030. var l int
  4031. _ = l
  4032. if len(m.Value) > 0 {
  4033. i -= len(m.Value)
  4034. copy(dAtA[i:], m.Value)
  4035. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4036. i--
  4037. dAtA[i] = 0x12
  4038. }
  4039. if len(m.Key) > 0 {
  4040. i -= len(m.Key)
  4041. copy(dAtA[i:], m.Key)
  4042. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4043. i--
  4044. dAtA[i] = 0xa
  4045. }
  4046. return len(dAtA) - i, nil
  4047. }
  4048. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  4049. size := m.Size()
  4050. dAtA = make([]byte, size)
  4051. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4052. if err != nil {
  4053. return nil, err
  4054. }
  4055. return dAtA[:n], nil
  4056. }
  4057. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  4058. size := m.Size()
  4059. return m.MarshalToSizedBuffer(dAtA[:size])
  4060. }
  4061. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4062. i := len(dAtA)
  4063. _ = i
  4064. var l int
  4065. _ = l
  4066. if m.InitialHeight != 0 {
  4067. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  4068. i--
  4069. dAtA[i] = 0x30
  4070. }
  4071. if len(m.AppStateBytes) > 0 {
  4072. i -= len(m.AppStateBytes)
  4073. copy(dAtA[i:], m.AppStateBytes)
  4074. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  4075. i--
  4076. dAtA[i] = 0x2a
  4077. }
  4078. if len(m.Validators) > 0 {
  4079. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4080. {
  4081. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4082. if err != nil {
  4083. return 0, err
  4084. }
  4085. i -= size
  4086. i = encodeVarintTypes(dAtA, i, uint64(size))
  4087. }
  4088. i--
  4089. dAtA[i] = 0x22
  4090. }
  4091. }
  4092. if m.ConsensusParams != nil {
  4093. {
  4094. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4095. if err != nil {
  4096. return 0, err
  4097. }
  4098. i -= size
  4099. i = encodeVarintTypes(dAtA, i, uint64(size))
  4100. }
  4101. i--
  4102. dAtA[i] = 0x1a
  4103. }
  4104. if len(m.ChainId) > 0 {
  4105. i -= len(m.ChainId)
  4106. copy(dAtA[i:], m.ChainId)
  4107. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  4108. i--
  4109. dAtA[i] = 0x12
  4110. }
  4111. n17, err17 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  4112. if err17 != nil {
  4113. return 0, err17
  4114. }
  4115. i -= n17
  4116. i = encodeVarintTypes(dAtA, i, uint64(n17))
  4117. i--
  4118. dAtA[i] = 0xa
  4119. return len(dAtA) - i, nil
  4120. }
  4121. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  4122. size := m.Size()
  4123. dAtA = make([]byte, size)
  4124. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4125. if err != nil {
  4126. return nil, err
  4127. }
  4128. return dAtA[:n], nil
  4129. }
  4130. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  4131. size := m.Size()
  4132. return m.MarshalToSizedBuffer(dAtA[:size])
  4133. }
  4134. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4135. i := len(dAtA)
  4136. _ = i
  4137. var l int
  4138. _ = l
  4139. if m.Prove {
  4140. i--
  4141. if m.Prove {
  4142. dAtA[i] = 1
  4143. } else {
  4144. dAtA[i] = 0
  4145. }
  4146. i--
  4147. dAtA[i] = 0x20
  4148. }
  4149. if m.Height != 0 {
  4150. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4151. i--
  4152. dAtA[i] = 0x18
  4153. }
  4154. if len(m.Path) > 0 {
  4155. i -= len(m.Path)
  4156. copy(dAtA[i:], m.Path)
  4157. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  4158. i--
  4159. dAtA[i] = 0x12
  4160. }
  4161. if len(m.Data) > 0 {
  4162. i -= len(m.Data)
  4163. copy(dAtA[i:], m.Data)
  4164. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4165. i--
  4166. dAtA[i] = 0xa
  4167. }
  4168. return len(dAtA) - i, nil
  4169. }
  4170. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  4171. size := m.Size()
  4172. dAtA = make([]byte, size)
  4173. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4174. if err != nil {
  4175. return nil, err
  4176. }
  4177. return dAtA[:n], nil
  4178. }
  4179. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4180. size := m.Size()
  4181. return m.MarshalToSizedBuffer(dAtA[:size])
  4182. }
  4183. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4184. i := len(dAtA)
  4185. _ = i
  4186. var l int
  4187. _ = l
  4188. if len(m.ByzantineValidators) > 0 {
  4189. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  4190. {
  4191. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4192. if err != nil {
  4193. return 0, err
  4194. }
  4195. i -= size
  4196. i = encodeVarintTypes(dAtA, i, uint64(size))
  4197. }
  4198. i--
  4199. dAtA[i] = 0x22
  4200. }
  4201. }
  4202. {
  4203. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  4204. if err != nil {
  4205. return 0, err
  4206. }
  4207. i -= size
  4208. i = encodeVarintTypes(dAtA, i, uint64(size))
  4209. }
  4210. i--
  4211. dAtA[i] = 0x1a
  4212. {
  4213. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  4214. if err != nil {
  4215. return 0, err
  4216. }
  4217. i -= size
  4218. i = encodeVarintTypes(dAtA, i, uint64(size))
  4219. }
  4220. i--
  4221. dAtA[i] = 0x12
  4222. if len(m.Hash) > 0 {
  4223. i -= len(m.Hash)
  4224. copy(dAtA[i:], m.Hash)
  4225. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  4226. i--
  4227. dAtA[i] = 0xa
  4228. }
  4229. return len(dAtA) - i, nil
  4230. }
  4231. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  4232. size := m.Size()
  4233. dAtA = make([]byte, size)
  4234. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4235. if err != nil {
  4236. return nil, err
  4237. }
  4238. return dAtA[:n], nil
  4239. }
  4240. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4241. size := m.Size()
  4242. return m.MarshalToSizedBuffer(dAtA[:size])
  4243. }
  4244. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4245. i := len(dAtA)
  4246. _ = i
  4247. var l int
  4248. _ = l
  4249. if m.Type != 0 {
  4250. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  4251. i--
  4252. dAtA[i] = 0x10
  4253. }
  4254. if len(m.Tx) > 0 {
  4255. i -= len(m.Tx)
  4256. copy(dAtA[i:], m.Tx)
  4257. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4258. i--
  4259. dAtA[i] = 0xa
  4260. }
  4261. return len(dAtA) - i, nil
  4262. }
  4263. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  4264. size := m.Size()
  4265. dAtA = make([]byte, size)
  4266. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4267. if err != nil {
  4268. return nil, err
  4269. }
  4270. return dAtA[:n], nil
  4271. }
  4272. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4273. size := m.Size()
  4274. return m.MarshalToSizedBuffer(dAtA[:size])
  4275. }
  4276. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4277. i := len(dAtA)
  4278. _ = i
  4279. var l int
  4280. _ = l
  4281. if len(m.Tx) > 0 {
  4282. i -= len(m.Tx)
  4283. copy(dAtA[i:], m.Tx)
  4284. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4285. i--
  4286. dAtA[i] = 0xa
  4287. }
  4288. return len(dAtA) - i, nil
  4289. }
  4290. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  4291. size := m.Size()
  4292. dAtA = make([]byte, size)
  4293. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4294. if err != nil {
  4295. return nil, err
  4296. }
  4297. return dAtA[:n], nil
  4298. }
  4299. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4300. size := m.Size()
  4301. return m.MarshalToSizedBuffer(dAtA[:size])
  4302. }
  4303. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4304. i := len(dAtA)
  4305. _ = i
  4306. var l int
  4307. _ = l
  4308. if m.Height != 0 {
  4309. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4310. i--
  4311. dAtA[i] = 0x8
  4312. }
  4313. return len(dAtA) - i, nil
  4314. }
  4315. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4316. size := m.Size()
  4317. dAtA = make([]byte, size)
  4318. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4319. if err != nil {
  4320. return nil, err
  4321. }
  4322. return dAtA[:n], nil
  4323. }
  4324. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4325. size := m.Size()
  4326. return m.MarshalToSizedBuffer(dAtA[:size])
  4327. }
  4328. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4329. i := len(dAtA)
  4330. _ = i
  4331. var l int
  4332. _ = l
  4333. return len(dAtA) - i, nil
  4334. }
  4335. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4336. size := m.Size()
  4337. dAtA = make([]byte, size)
  4338. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4339. if err != nil {
  4340. return nil, err
  4341. }
  4342. return dAtA[:n], nil
  4343. }
  4344. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4345. size := m.Size()
  4346. return m.MarshalToSizedBuffer(dAtA[:size])
  4347. }
  4348. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4349. i := len(dAtA)
  4350. _ = i
  4351. var l int
  4352. _ = l
  4353. return len(dAtA) - i, nil
  4354. }
  4355. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4356. size := m.Size()
  4357. dAtA = make([]byte, size)
  4358. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4359. if err != nil {
  4360. return nil, err
  4361. }
  4362. return dAtA[:n], nil
  4363. }
  4364. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4365. size := m.Size()
  4366. return m.MarshalToSizedBuffer(dAtA[:size])
  4367. }
  4368. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4369. i := len(dAtA)
  4370. _ = i
  4371. var l int
  4372. _ = l
  4373. if len(m.AppHash) > 0 {
  4374. i -= len(m.AppHash)
  4375. copy(dAtA[i:], m.AppHash)
  4376. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4377. i--
  4378. dAtA[i] = 0x12
  4379. }
  4380. if m.Snapshot != nil {
  4381. {
  4382. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4383. if err != nil {
  4384. return 0, err
  4385. }
  4386. i -= size
  4387. i = encodeVarintTypes(dAtA, i, uint64(size))
  4388. }
  4389. i--
  4390. dAtA[i] = 0xa
  4391. }
  4392. return len(dAtA) - i, nil
  4393. }
  4394. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4395. size := m.Size()
  4396. dAtA = make([]byte, size)
  4397. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4398. if err != nil {
  4399. return nil, err
  4400. }
  4401. return dAtA[:n], nil
  4402. }
  4403. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4404. size := m.Size()
  4405. return m.MarshalToSizedBuffer(dAtA[:size])
  4406. }
  4407. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4408. i := len(dAtA)
  4409. _ = i
  4410. var l int
  4411. _ = l
  4412. if m.Chunk != 0 {
  4413. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4414. i--
  4415. dAtA[i] = 0x18
  4416. }
  4417. if m.Format != 0 {
  4418. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4419. i--
  4420. dAtA[i] = 0x10
  4421. }
  4422. if m.Height != 0 {
  4423. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4424. i--
  4425. dAtA[i] = 0x8
  4426. }
  4427. return len(dAtA) - i, nil
  4428. }
  4429. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4430. size := m.Size()
  4431. dAtA = make([]byte, size)
  4432. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4433. if err != nil {
  4434. return nil, err
  4435. }
  4436. return dAtA[:n], nil
  4437. }
  4438. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4439. size := m.Size()
  4440. return m.MarshalToSizedBuffer(dAtA[:size])
  4441. }
  4442. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4443. i := len(dAtA)
  4444. _ = i
  4445. var l int
  4446. _ = l
  4447. if len(m.Sender) > 0 {
  4448. i -= len(m.Sender)
  4449. copy(dAtA[i:], m.Sender)
  4450. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4451. i--
  4452. dAtA[i] = 0x1a
  4453. }
  4454. if len(m.Chunk) > 0 {
  4455. i -= len(m.Chunk)
  4456. copy(dAtA[i:], m.Chunk)
  4457. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4458. i--
  4459. dAtA[i] = 0x12
  4460. }
  4461. if m.Index != 0 {
  4462. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4463. i--
  4464. dAtA[i] = 0x8
  4465. }
  4466. return len(dAtA) - i, nil
  4467. }
  4468. func (m *Response) Marshal() (dAtA []byte, err error) {
  4469. size := m.Size()
  4470. dAtA = make([]byte, size)
  4471. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4472. if err != nil {
  4473. return nil, err
  4474. }
  4475. return dAtA[:n], nil
  4476. }
  4477. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4478. size := m.Size()
  4479. return m.MarshalToSizedBuffer(dAtA[:size])
  4480. }
  4481. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4482. i := len(dAtA)
  4483. _ = i
  4484. var l int
  4485. _ = l
  4486. if m.Value != nil {
  4487. {
  4488. size := m.Value.Size()
  4489. i -= size
  4490. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4491. return 0, err
  4492. }
  4493. }
  4494. }
  4495. return len(dAtA) - i, nil
  4496. }
  4497. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4498. size := m.Size()
  4499. return m.MarshalToSizedBuffer(dAtA[:size])
  4500. }
  4501. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4502. i := len(dAtA)
  4503. if m.Exception != nil {
  4504. {
  4505. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4506. if err != nil {
  4507. return 0, err
  4508. }
  4509. i -= size
  4510. i = encodeVarintTypes(dAtA, i, uint64(size))
  4511. }
  4512. i--
  4513. dAtA[i] = 0xa
  4514. }
  4515. return len(dAtA) - i, nil
  4516. }
  4517. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4518. size := m.Size()
  4519. return m.MarshalToSizedBuffer(dAtA[:size])
  4520. }
  4521. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4522. i := len(dAtA)
  4523. if m.Echo != nil {
  4524. {
  4525. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4526. if err != nil {
  4527. return 0, err
  4528. }
  4529. i -= size
  4530. i = encodeVarintTypes(dAtA, i, uint64(size))
  4531. }
  4532. i--
  4533. dAtA[i] = 0x12
  4534. }
  4535. return len(dAtA) - i, nil
  4536. }
  4537. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4538. size := m.Size()
  4539. return m.MarshalToSizedBuffer(dAtA[:size])
  4540. }
  4541. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4542. i := len(dAtA)
  4543. if m.Flush != nil {
  4544. {
  4545. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4546. if err != nil {
  4547. return 0, err
  4548. }
  4549. i -= size
  4550. i = encodeVarintTypes(dAtA, i, uint64(size))
  4551. }
  4552. i--
  4553. dAtA[i] = 0x1a
  4554. }
  4555. return len(dAtA) - i, nil
  4556. }
  4557. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4558. size := m.Size()
  4559. return m.MarshalToSizedBuffer(dAtA[:size])
  4560. }
  4561. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4562. i := len(dAtA)
  4563. if m.Info != nil {
  4564. {
  4565. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4566. if err != nil {
  4567. return 0, err
  4568. }
  4569. i -= size
  4570. i = encodeVarintTypes(dAtA, i, uint64(size))
  4571. }
  4572. i--
  4573. dAtA[i] = 0x22
  4574. }
  4575. return len(dAtA) - i, nil
  4576. }
  4577. func (m *Response_SetOption) MarshalTo(dAtA []byte) (int, error) {
  4578. size := m.Size()
  4579. return m.MarshalToSizedBuffer(dAtA[:size])
  4580. }
  4581. func (m *Response_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4582. i := len(dAtA)
  4583. if m.SetOption != nil {
  4584. {
  4585. size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i])
  4586. if err != nil {
  4587. return 0, err
  4588. }
  4589. i -= size
  4590. i = encodeVarintTypes(dAtA, i, uint64(size))
  4591. }
  4592. i--
  4593. dAtA[i] = 0x2a
  4594. }
  4595. return len(dAtA) - i, nil
  4596. }
  4597. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4598. size := m.Size()
  4599. return m.MarshalToSizedBuffer(dAtA[:size])
  4600. }
  4601. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4602. i := len(dAtA)
  4603. if m.InitChain != nil {
  4604. {
  4605. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4606. if err != nil {
  4607. return 0, err
  4608. }
  4609. i -= size
  4610. i = encodeVarintTypes(dAtA, i, uint64(size))
  4611. }
  4612. i--
  4613. dAtA[i] = 0x32
  4614. }
  4615. return len(dAtA) - i, nil
  4616. }
  4617. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4618. size := m.Size()
  4619. return m.MarshalToSizedBuffer(dAtA[:size])
  4620. }
  4621. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4622. i := len(dAtA)
  4623. if m.Query != nil {
  4624. {
  4625. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4626. if err != nil {
  4627. return 0, err
  4628. }
  4629. i -= size
  4630. i = encodeVarintTypes(dAtA, i, uint64(size))
  4631. }
  4632. i--
  4633. dAtA[i] = 0x3a
  4634. }
  4635. return len(dAtA) - i, nil
  4636. }
  4637. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4638. size := m.Size()
  4639. return m.MarshalToSizedBuffer(dAtA[:size])
  4640. }
  4641. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4642. i := len(dAtA)
  4643. if m.BeginBlock != nil {
  4644. {
  4645. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4646. if err != nil {
  4647. return 0, err
  4648. }
  4649. i -= size
  4650. i = encodeVarintTypes(dAtA, i, uint64(size))
  4651. }
  4652. i--
  4653. dAtA[i] = 0x42
  4654. }
  4655. return len(dAtA) - i, nil
  4656. }
  4657. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4658. size := m.Size()
  4659. return m.MarshalToSizedBuffer(dAtA[:size])
  4660. }
  4661. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4662. i := len(dAtA)
  4663. if m.CheckTx != nil {
  4664. {
  4665. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4666. if err != nil {
  4667. return 0, err
  4668. }
  4669. i -= size
  4670. i = encodeVarintTypes(dAtA, i, uint64(size))
  4671. }
  4672. i--
  4673. dAtA[i] = 0x4a
  4674. }
  4675. return len(dAtA) - i, nil
  4676. }
  4677. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4678. size := m.Size()
  4679. return m.MarshalToSizedBuffer(dAtA[:size])
  4680. }
  4681. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4682. i := len(dAtA)
  4683. if m.DeliverTx != nil {
  4684. {
  4685. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4686. if err != nil {
  4687. return 0, err
  4688. }
  4689. i -= size
  4690. i = encodeVarintTypes(dAtA, i, uint64(size))
  4691. }
  4692. i--
  4693. dAtA[i] = 0x52
  4694. }
  4695. return len(dAtA) - i, nil
  4696. }
  4697. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4698. size := m.Size()
  4699. return m.MarshalToSizedBuffer(dAtA[:size])
  4700. }
  4701. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4702. i := len(dAtA)
  4703. if m.EndBlock != nil {
  4704. {
  4705. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4706. if err != nil {
  4707. return 0, err
  4708. }
  4709. i -= size
  4710. i = encodeVarintTypes(dAtA, i, uint64(size))
  4711. }
  4712. i--
  4713. dAtA[i] = 0x5a
  4714. }
  4715. return len(dAtA) - i, nil
  4716. }
  4717. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4718. size := m.Size()
  4719. return m.MarshalToSizedBuffer(dAtA[:size])
  4720. }
  4721. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4722. i := len(dAtA)
  4723. if m.Commit != nil {
  4724. {
  4725. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4726. if err != nil {
  4727. return 0, err
  4728. }
  4729. i -= size
  4730. i = encodeVarintTypes(dAtA, i, uint64(size))
  4731. }
  4732. i--
  4733. dAtA[i] = 0x62
  4734. }
  4735. return len(dAtA) - i, nil
  4736. }
  4737. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4738. size := m.Size()
  4739. return m.MarshalToSizedBuffer(dAtA[:size])
  4740. }
  4741. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4742. i := len(dAtA)
  4743. if m.ListSnapshots != nil {
  4744. {
  4745. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4746. if err != nil {
  4747. return 0, err
  4748. }
  4749. i -= size
  4750. i = encodeVarintTypes(dAtA, i, uint64(size))
  4751. }
  4752. i--
  4753. dAtA[i] = 0x6a
  4754. }
  4755. return len(dAtA) - i, nil
  4756. }
  4757. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4758. size := m.Size()
  4759. return m.MarshalToSizedBuffer(dAtA[:size])
  4760. }
  4761. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4762. i := len(dAtA)
  4763. if m.OfferSnapshot != nil {
  4764. {
  4765. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4766. if err != nil {
  4767. return 0, err
  4768. }
  4769. i -= size
  4770. i = encodeVarintTypes(dAtA, i, uint64(size))
  4771. }
  4772. i--
  4773. dAtA[i] = 0x72
  4774. }
  4775. return len(dAtA) - i, nil
  4776. }
  4777. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4778. size := m.Size()
  4779. return m.MarshalToSizedBuffer(dAtA[:size])
  4780. }
  4781. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4782. i := len(dAtA)
  4783. if m.LoadSnapshotChunk != nil {
  4784. {
  4785. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4786. if err != nil {
  4787. return 0, err
  4788. }
  4789. i -= size
  4790. i = encodeVarintTypes(dAtA, i, uint64(size))
  4791. }
  4792. i--
  4793. dAtA[i] = 0x7a
  4794. }
  4795. return len(dAtA) - i, nil
  4796. }
  4797. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4798. size := m.Size()
  4799. return m.MarshalToSizedBuffer(dAtA[:size])
  4800. }
  4801. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4802. i := len(dAtA)
  4803. if m.ApplySnapshotChunk != nil {
  4804. {
  4805. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4806. if err != nil {
  4807. return 0, err
  4808. }
  4809. i -= size
  4810. i = encodeVarintTypes(dAtA, i, uint64(size))
  4811. }
  4812. i--
  4813. dAtA[i] = 0x1
  4814. i--
  4815. dAtA[i] = 0x82
  4816. }
  4817. return len(dAtA) - i, nil
  4818. }
  4819. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4820. size := m.Size()
  4821. dAtA = make([]byte, size)
  4822. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4823. if err != nil {
  4824. return nil, err
  4825. }
  4826. return dAtA[:n], nil
  4827. }
  4828. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4829. size := m.Size()
  4830. return m.MarshalToSizedBuffer(dAtA[:size])
  4831. }
  4832. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4833. i := len(dAtA)
  4834. _ = i
  4835. var l int
  4836. _ = l
  4837. if len(m.Error) > 0 {
  4838. i -= len(m.Error)
  4839. copy(dAtA[i:], m.Error)
  4840. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4841. i--
  4842. dAtA[i] = 0xa
  4843. }
  4844. return len(dAtA) - i, nil
  4845. }
  4846. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4847. size := m.Size()
  4848. dAtA = make([]byte, size)
  4849. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4850. if err != nil {
  4851. return nil, err
  4852. }
  4853. return dAtA[:n], nil
  4854. }
  4855. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4856. size := m.Size()
  4857. return m.MarshalToSizedBuffer(dAtA[:size])
  4858. }
  4859. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4860. i := len(dAtA)
  4861. _ = i
  4862. var l int
  4863. _ = l
  4864. if len(m.Message) > 0 {
  4865. i -= len(m.Message)
  4866. copy(dAtA[i:], m.Message)
  4867. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4868. i--
  4869. dAtA[i] = 0xa
  4870. }
  4871. return len(dAtA) - i, nil
  4872. }
  4873. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4874. size := m.Size()
  4875. dAtA = make([]byte, size)
  4876. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4877. if err != nil {
  4878. return nil, err
  4879. }
  4880. return dAtA[:n], nil
  4881. }
  4882. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4883. size := m.Size()
  4884. return m.MarshalToSizedBuffer(dAtA[:size])
  4885. }
  4886. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4887. i := len(dAtA)
  4888. _ = i
  4889. var l int
  4890. _ = l
  4891. return len(dAtA) - i, nil
  4892. }
  4893. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4894. size := m.Size()
  4895. dAtA = make([]byte, size)
  4896. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4897. if err != nil {
  4898. return nil, err
  4899. }
  4900. return dAtA[:n], nil
  4901. }
  4902. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4903. size := m.Size()
  4904. return m.MarshalToSizedBuffer(dAtA[:size])
  4905. }
  4906. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4907. i := len(dAtA)
  4908. _ = i
  4909. var l int
  4910. _ = l
  4911. if len(m.LastBlockAppHash) > 0 {
  4912. i -= len(m.LastBlockAppHash)
  4913. copy(dAtA[i:], m.LastBlockAppHash)
  4914. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4915. i--
  4916. dAtA[i] = 0x2a
  4917. }
  4918. if m.LastBlockHeight != 0 {
  4919. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4920. i--
  4921. dAtA[i] = 0x20
  4922. }
  4923. if m.AppVersion != 0 {
  4924. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4925. i--
  4926. dAtA[i] = 0x18
  4927. }
  4928. if len(m.Version) > 0 {
  4929. i -= len(m.Version)
  4930. copy(dAtA[i:], m.Version)
  4931. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4932. i--
  4933. dAtA[i] = 0x12
  4934. }
  4935. if len(m.Data) > 0 {
  4936. i -= len(m.Data)
  4937. copy(dAtA[i:], m.Data)
  4938. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4939. i--
  4940. dAtA[i] = 0xa
  4941. }
  4942. return len(dAtA) - i, nil
  4943. }
  4944. func (m *ResponseSetOption) Marshal() (dAtA []byte, err error) {
  4945. size := m.Size()
  4946. dAtA = make([]byte, size)
  4947. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4948. if err != nil {
  4949. return nil, err
  4950. }
  4951. return dAtA[:n], nil
  4952. }
  4953. func (m *ResponseSetOption) MarshalTo(dAtA []byte) (int, error) {
  4954. size := m.Size()
  4955. return m.MarshalToSizedBuffer(dAtA[:size])
  4956. }
  4957. func (m *ResponseSetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4958. i := len(dAtA)
  4959. _ = i
  4960. var l int
  4961. _ = l
  4962. if len(m.Info) > 0 {
  4963. i -= len(m.Info)
  4964. copy(dAtA[i:], m.Info)
  4965. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4966. i--
  4967. dAtA[i] = 0x22
  4968. }
  4969. if len(m.Log) > 0 {
  4970. i -= len(m.Log)
  4971. copy(dAtA[i:], m.Log)
  4972. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4973. i--
  4974. dAtA[i] = 0x1a
  4975. }
  4976. if m.Code != 0 {
  4977. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4978. i--
  4979. dAtA[i] = 0x8
  4980. }
  4981. return len(dAtA) - i, nil
  4982. }
  4983. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4984. size := m.Size()
  4985. dAtA = make([]byte, size)
  4986. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4987. if err != nil {
  4988. return nil, err
  4989. }
  4990. return dAtA[:n], nil
  4991. }
  4992. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4993. size := m.Size()
  4994. return m.MarshalToSizedBuffer(dAtA[:size])
  4995. }
  4996. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4997. i := len(dAtA)
  4998. _ = i
  4999. var l int
  5000. _ = l
  5001. if len(m.AppHash) > 0 {
  5002. i -= len(m.AppHash)
  5003. copy(dAtA[i:], m.AppHash)
  5004. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  5005. i--
  5006. dAtA[i] = 0x1a
  5007. }
  5008. if len(m.Validators) > 0 {
  5009. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  5010. {
  5011. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5012. if err != nil {
  5013. return 0, err
  5014. }
  5015. i -= size
  5016. i = encodeVarintTypes(dAtA, i, uint64(size))
  5017. }
  5018. i--
  5019. dAtA[i] = 0x12
  5020. }
  5021. }
  5022. if m.ConsensusParams != nil {
  5023. {
  5024. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  5025. if err != nil {
  5026. return 0, err
  5027. }
  5028. i -= size
  5029. i = encodeVarintTypes(dAtA, i, uint64(size))
  5030. }
  5031. i--
  5032. dAtA[i] = 0xa
  5033. }
  5034. return len(dAtA) - i, nil
  5035. }
  5036. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  5037. size := m.Size()
  5038. dAtA = make([]byte, size)
  5039. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5040. if err != nil {
  5041. return nil, err
  5042. }
  5043. return dAtA[:n], nil
  5044. }
  5045. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  5046. size := m.Size()
  5047. return m.MarshalToSizedBuffer(dAtA[:size])
  5048. }
  5049. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5050. i := len(dAtA)
  5051. _ = i
  5052. var l int
  5053. _ = l
  5054. if len(m.Codespace) > 0 {
  5055. i -= len(m.Codespace)
  5056. copy(dAtA[i:], m.Codespace)
  5057. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  5058. i--
  5059. dAtA[i] = 0x52
  5060. }
  5061. if m.Height != 0 {
  5062. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5063. i--
  5064. dAtA[i] = 0x48
  5065. }
  5066. if m.ProofOps != nil {
  5067. {
  5068. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  5069. if err != nil {
  5070. return 0, err
  5071. }
  5072. i -= size
  5073. i = encodeVarintTypes(dAtA, i, uint64(size))
  5074. }
  5075. i--
  5076. dAtA[i] = 0x42
  5077. }
  5078. if len(m.Value) > 0 {
  5079. i -= len(m.Value)
  5080. copy(dAtA[i:], m.Value)
  5081. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5082. i--
  5083. dAtA[i] = 0x3a
  5084. }
  5085. if len(m.Key) > 0 {
  5086. i -= len(m.Key)
  5087. copy(dAtA[i:], m.Key)
  5088. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5089. i--
  5090. dAtA[i] = 0x32
  5091. }
  5092. if m.Index != 0 {
  5093. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5094. i--
  5095. dAtA[i] = 0x28
  5096. }
  5097. if len(m.Info) > 0 {
  5098. i -= len(m.Info)
  5099. copy(dAtA[i:], m.Info)
  5100. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  5101. i--
  5102. dAtA[i] = 0x22
  5103. }
  5104. if len(m.Log) > 0 {
  5105. i -= len(m.Log)
  5106. copy(dAtA[i:], m.Log)
  5107. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5108. i--
  5109. dAtA[i] = 0x1a
  5110. }
  5111. if m.Code != 0 {
  5112. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5113. i--
  5114. dAtA[i] = 0x8
  5115. }
  5116. return len(dAtA) - i, nil
  5117. }
  5118. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  5119. size := m.Size()
  5120. dAtA = make([]byte, size)
  5121. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5122. if err != nil {
  5123. return nil, err
  5124. }
  5125. return dAtA[:n], nil
  5126. }
  5127. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  5128. size := m.Size()
  5129. return m.MarshalToSizedBuffer(dAtA[:size])
  5130. }
  5131. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5132. i := len(dAtA)
  5133. _ = i
  5134. var l int
  5135. _ = l
  5136. if len(m.Events) > 0 {
  5137. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5138. {
  5139. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5140. if err != nil {
  5141. return 0, err
  5142. }
  5143. i -= size
  5144. i = encodeVarintTypes(dAtA, i, uint64(size))
  5145. }
  5146. i--
  5147. dAtA[i] = 0xa
  5148. }
  5149. }
  5150. return len(dAtA) - i, nil
  5151. }
  5152. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  5153. size := m.Size()
  5154. dAtA = make([]byte, size)
  5155. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5156. if err != nil {
  5157. return nil, err
  5158. }
  5159. return dAtA[:n], nil
  5160. }
  5161. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  5162. size := m.Size()
  5163. return m.MarshalToSizedBuffer(dAtA[:size])
  5164. }
  5165. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5166. i := len(dAtA)
  5167. _ = i
  5168. var l int
  5169. _ = l
  5170. if len(m.Codespace) > 0 {
  5171. i -= len(m.Codespace)
  5172. copy(dAtA[i:], m.Codespace)
  5173. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  5174. i--
  5175. dAtA[i] = 0x42
  5176. }
  5177. if len(m.Events) > 0 {
  5178. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5179. {
  5180. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5181. if err != nil {
  5182. return 0, err
  5183. }
  5184. i -= size
  5185. i = encodeVarintTypes(dAtA, i, uint64(size))
  5186. }
  5187. i--
  5188. dAtA[i] = 0x3a
  5189. }
  5190. }
  5191. if m.GasUsed != 0 {
  5192. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  5193. i--
  5194. dAtA[i] = 0x30
  5195. }
  5196. if m.GasWanted != 0 {
  5197. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  5198. i--
  5199. dAtA[i] = 0x28
  5200. }
  5201. if len(m.Info) > 0 {
  5202. i -= len(m.Info)
  5203. copy(dAtA[i:], m.Info)
  5204. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  5205. i--
  5206. dAtA[i] = 0x22
  5207. }
  5208. if len(m.Log) > 0 {
  5209. i -= len(m.Log)
  5210. copy(dAtA[i:], m.Log)
  5211. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5212. i--
  5213. dAtA[i] = 0x1a
  5214. }
  5215. if len(m.Data) > 0 {
  5216. i -= len(m.Data)
  5217. copy(dAtA[i:], m.Data)
  5218. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5219. i--
  5220. dAtA[i] = 0x12
  5221. }
  5222. if m.Code != 0 {
  5223. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5224. i--
  5225. dAtA[i] = 0x8
  5226. }
  5227. return len(dAtA) - i, nil
  5228. }
  5229. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  5230. size := m.Size()
  5231. dAtA = make([]byte, size)
  5232. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5233. if err != nil {
  5234. return nil, err
  5235. }
  5236. return dAtA[:n], nil
  5237. }
  5238. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  5239. size := m.Size()
  5240. return m.MarshalToSizedBuffer(dAtA[:size])
  5241. }
  5242. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5243. i := len(dAtA)
  5244. _ = i
  5245. var l int
  5246. _ = l
  5247. if len(m.Codespace) > 0 {
  5248. i -= len(m.Codespace)
  5249. copy(dAtA[i:], m.Codespace)
  5250. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  5251. i--
  5252. dAtA[i] = 0x42
  5253. }
  5254. if len(m.Events) > 0 {
  5255. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5256. {
  5257. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5258. if err != nil {
  5259. return 0, err
  5260. }
  5261. i -= size
  5262. i = encodeVarintTypes(dAtA, i, uint64(size))
  5263. }
  5264. i--
  5265. dAtA[i] = 0x3a
  5266. }
  5267. }
  5268. if m.GasUsed != 0 {
  5269. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  5270. i--
  5271. dAtA[i] = 0x30
  5272. }
  5273. if m.GasWanted != 0 {
  5274. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  5275. i--
  5276. dAtA[i] = 0x28
  5277. }
  5278. if len(m.Info) > 0 {
  5279. i -= len(m.Info)
  5280. copy(dAtA[i:], m.Info)
  5281. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  5282. i--
  5283. dAtA[i] = 0x22
  5284. }
  5285. if len(m.Log) > 0 {
  5286. i -= len(m.Log)
  5287. copy(dAtA[i:], m.Log)
  5288. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5289. i--
  5290. dAtA[i] = 0x1a
  5291. }
  5292. if len(m.Data) > 0 {
  5293. i -= len(m.Data)
  5294. copy(dAtA[i:], m.Data)
  5295. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5296. i--
  5297. dAtA[i] = 0x12
  5298. }
  5299. if m.Code != 0 {
  5300. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5301. i--
  5302. dAtA[i] = 0x8
  5303. }
  5304. return len(dAtA) - i, nil
  5305. }
  5306. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  5307. size := m.Size()
  5308. dAtA = make([]byte, size)
  5309. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5310. if err != nil {
  5311. return nil, err
  5312. }
  5313. return dAtA[:n], nil
  5314. }
  5315. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  5316. size := m.Size()
  5317. return m.MarshalToSizedBuffer(dAtA[:size])
  5318. }
  5319. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5320. i := len(dAtA)
  5321. _ = i
  5322. var l int
  5323. _ = l
  5324. if len(m.Events) > 0 {
  5325. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5326. {
  5327. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5328. if err != nil {
  5329. return 0, err
  5330. }
  5331. i -= size
  5332. i = encodeVarintTypes(dAtA, i, uint64(size))
  5333. }
  5334. i--
  5335. dAtA[i] = 0x1a
  5336. }
  5337. }
  5338. if m.ConsensusParamUpdates != nil {
  5339. {
  5340. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  5341. if err != nil {
  5342. return 0, err
  5343. }
  5344. i -= size
  5345. i = encodeVarintTypes(dAtA, i, uint64(size))
  5346. }
  5347. i--
  5348. dAtA[i] = 0x12
  5349. }
  5350. if len(m.ValidatorUpdates) > 0 {
  5351. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5352. {
  5353. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5354. if err != nil {
  5355. return 0, err
  5356. }
  5357. i -= size
  5358. i = encodeVarintTypes(dAtA, i, uint64(size))
  5359. }
  5360. i--
  5361. dAtA[i] = 0xa
  5362. }
  5363. }
  5364. return len(dAtA) - i, nil
  5365. }
  5366. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5367. size := m.Size()
  5368. dAtA = make([]byte, size)
  5369. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5370. if err != nil {
  5371. return nil, err
  5372. }
  5373. return dAtA[:n], nil
  5374. }
  5375. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5376. size := m.Size()
  5377. return m.MarshalToSizedBuffer(dAtA[:size])
  5378. }
  5379. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5380. i := len(dAtA)
  5381. _ = i
  5382. var l int
  5383. _ = l
  5384. if m.RetainHeight != 0 {
  5385. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5386. i--
  5387. dAtA[i] = 0x18
  5388. }
  5389. if len(m.Data) > 0 {
  5390. i -= len(m.Data)
  5391. copy(dAtA[i:], m.Data)
  5392. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5393. i--
  5394. dAtA[i] = 0x12
  5395. }
  5396. return len(dAtA) - i, nil
  5397. }
  5398. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5399. size := m.Size()
  5400. dAtA = make([]byte, size)
  5401. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5402. if err != nil {
  5403. return nil, err
  5404. }
  5405. return dAtA[:n], nil
  5406. }
  5407. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5408. size := m.Size()
  5409. return m.MarshalToSizedBuffer(dAtA[:size])
  5410. }
  5411. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5412. i := len(dAtA)
  5413. _ = i
  5414. var l int
  5415. _ = l
  5416. if len(m.Snapshots) > 0 {
  5417. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5418. {
  5419. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5420. if err != nil {
  5421. return 0, err
  5422. }
  5423. i -= size
  5424. i = encodeVarintTypes(dAtA, i, uint64(size))
  5425. }
  5426. i--
  5427. dAtA[i] = 0xa
  5428. }
  5429. }
  5430. return len(dAtA) - i, nil
  5431. }
  5432. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5433. size := m.Size()
  5434. dAtA = make([]byte, size)
  5435. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5436. if err != nil {
  5437. return nil, err
  5438. }
  5439. return dAtA[:n], nil
  5440. }
  5441. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5442. size := m.Size()
  5443. return m.MarshalToSizedBuffer(dAtA[:size])
  5444. }
  5445. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5446. i := len(dAtA)
  5447. _ = i
  5448. var l int
  5449. _ = l
  5450. if m.Result != 0 {
  5451. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5452. i--
  5453. dAtA[i] = 0x8
  5454. }
  5455. return len(dAtA) - i, nil
  5456. }
  5457. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5458. size := m.Size()
  5459. dAtA = make([]byte, size)
  5460. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5461. if err != nil {
  5462. return nil, err
  5463. }
  5464. return dAtA[:n], nil
  5465. }
  5466. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5467. size := m.Size()
  5468. return m.MarshalToSizedBuffer(dAtA[:size])
  5469. }
  5470. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5471. i := len(dAtA)
  5472. _ = i
  5473. var l int
  5474. _ = l
  5475. if len(m.Chunk) > 0 {
  5476. i -= len(m.Chunk)
  5477. copy(dAtA[i:], m.Chunk)
  5478. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5479. i--
  5480. dAtA[i] = 0xa
  5481. }
  5482. return len(dAtA) - i, nil
  5483. }
  5484. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5485. size := m.Size()
  5486. dAtA = make([]byte, size)
  5487. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5488. if err != nil {
  5489. return nil, err
  5490. }
  5491. return dAtA[:n], nil
  5492. }
  5493. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5494. size := m.Size()
  5495. return m.MarshalToSizedBuffer(dAtA[:size])
  5496. }
  5497. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5498. i := len(dAtA)
  5499. _ = i
  5500. var l int
  5501. _ = l
  5502. if len(m.RejectSenders) > 0 {
  5503. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5504. i -= len(m.RejectSenders[iNdEx])
  5505. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5506. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5507. i--
  5508. dAtA[i] = 0x1a
  5509. }
  5510. }
  5511. if len(m.RefetchChunks) > 0 {
  5512. dAtA41 := make([]byte, len(m.RefetchChunks)*10)
  5513. var j40 int
  5514. for _, num := range m.RefetchChunks {
  5515. for num >= 1<<7 {
  5516. dAtA41[j40] = uint8(uint64(num)&0x7f | 0x80)
  5517. num >>= 7
  5518. j40++
  5519. }
  5520. dAtA41[j40] = uint8(num)
  5521. j40++
  5522. }
  5523. i -= j40
  5524. copy(dAtA[i:], dAtA41[:j40])
  5525. i = encodeVarintTypes(dAtA, i, uint64(j40))
  5526. i--
  5527. dAtA[i] = 0x12
  5528. }
  5529. if m.Result != 0 {
  5530. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5531. i--
  5532. dAtA[i] = 0x8
  5533. }
  5534. return len(dAtA) - i, nil
  5535. }
  5536. func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
  5537. size := m.Size()
  5538. dAtA = make([]byte, size)
  5539. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5540. if err != nil {
  5541. return nil, err
  5542. }
  5543. return dAtA[:n], nil
  5544. }
  5545. func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
  5546. size := m.Size()
  5547. return m.MarshalToSizedBuffer(dAtA[:size])
  5548. }
  5549. func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5550. i := len(dAtA)
  5551. _ = i
  5552. var l int
  5553. _ = l
  5554. if m.Version != nil {
  5555. {
  5556. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  5557. if err != nil {
  5558. return 0, err
  5559. }
  5560. i -= size
  5561. i = encodeVarintTypes(dAtA, i, uint64(size))
  5562. }
  5563. i--
  5564. dAtA[i] = 0x22
  5565. }
  5566. if m.Validator != nil {
  5567. {
  5568. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5569. if err != nil {
  5570. return 0, err
  5571. }
  5572. i -= size
  5573. i = encodeVarintTypes(dAtA, i, uint64(size))
  5574. }
  5575. i--
  5576. dAtA[i] = 0x1a
  5577. }
  5578. if m.Evidence != nil {
  5579. {
  5580. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  5581. if err != nil {
  5582. return 0, err
  5583. }
  5584. i -= size
  5585. i = encodeVarintTypes(dAtA, i, uint64(size))
  5586. }
  5587. i--
  5588. dAtA[i] = 0x12
  5589. }
  5590. if m.Block != nil {
  5591. {
  5592. size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
  5593. if err != nil {
  5594. return 0, err
  5595. }
  5596. i -= size
  5597. i = encodeVarintTypes(dAtA, i, uint64(size))
  5598. }
  5599. i--
  5600. dAtA[i] = 0xa
  5601. }
  5602. return len(dAtA) - i, nil
  5603. }
  5604. func (m *BlockParams) Marshal() (dAtA []byte, err error) {
  5605. size := m.Size()
  5606. dAtA = make([]byte, size)
  5607. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5608. if err != nil {
  5609. return nil, err
  5610. }
  5611. return dAtA[:n], nil
  5612. }
  5613. func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) {
  5614. size := m.Size()
  5615. return m.MarshalToSizedBuffer(dAtA[:size])
  5616. }
  5617. func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5618. i := len(dAtA)
  5619. _ = i
  5620. var l int
  5621. _ = l
  5622. if m.MaxGas != 0 {
  5623. i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas))
  5624. i--
  5625. dAtA[i] = 0x10
  5626. }
  5627. if m.MaxBytes != 0 {
  5628. i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes))
  5629. i--
  5630. dAtA[i] = 0x8
  5631. }
  5632. return len(dAtA) - i, nil
  5633. }
  5634. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5635. size := m.Size()
  5636. dAtA = make([]byte, size)
  5637. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5638. if err != nil {
  5639. return nil, err
  5640. }
  5641. return dAtA[:n], nil
  5642. }
  5643. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5644. size := m.Size()
  5645. return m.MarshalToSizedBuffer(dAtA[:size])
  5646. }
  5647. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5648. i := len(dAtA)
  5649. _ = i
  5650. var l int
  5651. _ = l
  5652. if len(m.Votes) > 0 {
  5653. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5654. {
  5655. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5656. if err != nil {
  5657. return 0, err
  5658. }
  5659. i -= size
  5660. i = encodeVarintTypes(dAtA, i, uint64(size))
  5661. }
  5662. i--
  5663. dAtA[i] = 0x12
  5664. }
  5665. }
  5666. if m.Round != 0 {
  5667. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5668. i--
  5669. dAtA[i] = 0x8
  5670. }
  5671. return len(dAtA) - i, nil
  5672. }
  5673. func (m *Event) Marshal() (dAtA []byte, err error) {
  5674. size := m.Size()
  5675. dAtA = make([]byte, size)
  5676. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5677. if err != nil {
  5678. return nil, err
  5679. }
  5680. return dAtA[:n], nil
  5681. }
  5682. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5683. size := m.Size()
  5684. return m.MarshalToSizedBuffer(dAtA[:size])
  5685. }
  5686. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5687. i := len(dAtA)
  5688. _ = i
  5689. var l int
  5690. _ = l
  5691. if len(m.Attributes) > 0 {
  5692. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5693. {
  5694. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5695. if err != nil {
  5696. return 0, err
  5697. }
  5698. i -= size
  5699. i = encodeVarintTypes(dAtA, i, uint64(size))
  5700. }
  5701. i--
  5702. dAtA[i] = 0x12
  5703. }
  5704. }
  5705. if len(m.Type) > 0 {
  5706. i -= len(m.Type)
  5707. copy(dAtA[i:], m.Type)
  5708. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5709. i--
  5710. dAtA[i] = 0xa
  5711. }
  5712. return len(dAtA) - i, nil
  5713. }
  5714. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5715. size := m.Size()
  5716. dAtA = make([]byte, size)
  5717. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5718. if err != nil {
  5719. return nil, err
  5720. }
  5721. return dAtA[:n], nil
  5722. }
  5723. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5724. size := m.Size()
  5725. return m.MarshalToSizedBuffer(dAtA[:size])
  5726. }
  5727. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5728. i := len(dAtA)
  5729. _ = i
  5730. var l int
  5731. _ = l
  5732. if m.Index {
  5733. i--
  5734. if m.Index {
  5735. dAtA[i] = 1
  5736. } else {
  5737. dAtA[i] = 0
  5738. }
  5739. i--
  5740. dAtA[i] = 0x18
  5741. }
  5742. if len(m.Value) > 0 {
  5743. i -= len(m.Value)
  5744. copy(dAtA[i:], m.Value)
  5745. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5746. i--
  5747. dAtA[i] = 0x12
  5748. }
  5749. if len(m.Key) > 0 {
  5750. i -= len(m.Key)
  5751. copy(dAtA[i:], m.Key)
  5752. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5753. i--
  5754. dAtA[i] = 0xa
  5755. }
  5756. return len(dAtA) - i, nil
  5757. }
  5758. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5759. size := m.Size()
  5760. dAtA = make([]byte, size)
  5761. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5762. if err != nil {
  5763. return nil, err
  5764. }
  5765. return dAtA[:n], nil
  5766. }
  5767. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5768. size := m.Size()
  5769. return m.MarshalToSizedBuffer(dAtA[:size])
  5770. }
  5771. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5772. i := len(dAtA)
  5773. _ = i
  5774. var l int
  5775. _ = l
  5776. {
  5777. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5778. if err != nil {
  5779. return 0, err
  5780. }
  5781. i -= size
  5782. i = encodeVarintTypes(dAtA, i, uint64(size))
  5783. }
  5784. i--
  5785. dAtA[i] = 0x22
  5786. if len(m.Tx) > 0 {
  5787. i -= len(m.Tx)
  5788. copy(dAtA[i:], m.Tx)
  5789. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5790. i--
  5791. dAtA[i] = 0x1a
  5792. }
  5793. if m.Index != 0 {
  5794. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5795. i--
  5796. dAtA[i] = 0x10
  5797. }
  5798. if m.Height != 0 {
  5799. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5800. i--
  5801. dAtA[i] = 0x8
  5802. }
  5803. return len(dAtA) - i, nil
  5804. }
  5805. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5806. size := m.Size()
  5807. dAtA = make([]byte, size)
  5808. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5809. if err != nil {
  5810. return nil, err
  5811. }
  5812. return dAtA[:n], nil
  5813. }
  5814. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5815. size := m.Size()
  5816. return m.MarshalToSizedBuffer(dAtA[:size])
  5817. }
  5818. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5819. i := len(dAtA)
  5820. _ = i
  5821. var l int
  5822. _ = l
  5823. if m.Power != 0 {
  5824. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5825. i--
  5826. dAtA[i] = 0x18
  5827. }
  5828. if len(m.Address) > 0 {
  5829. i -= len(m.Address)
  5830. copy(dAtA[i:], m.Address)
  5831. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5832. i--
  5833. dAtA[i] = 0xa
  5834. }
  5835. return len(dAtA) - i, nil
  5836. }
  5837. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5838. size := m.Size()
  5839. dAtA = make([]byte, size)
  5840. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5841. if err != nil {
  5842. return nil, err
  5843. }
  5844. return dAtA[:n], nil
  5845. }
  5846. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5847. size := m.Size()
  5848. return m.MarshalToSizedBuffer(dAtA[:size])
  5849. }
  5850. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5851. i := len(dAtA)
  5852. _ = i
  5853. var l int
  5854. _ = l
  5855. if m.Power != 0 {
  5856. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5857. i--
  5858. dAtA[i] = 0x10
  5859. }
  5860. {
  5861. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5862. if err != nil {
  5863. return 0, err
  5864. }
  5865. i -= size
  5866. i = encodeVarintTypes(dAtA, i, uint64(size))
  5867. }
  5868. i--
  5869. dAtA[i] = 0xa
  5870. return len(dAtA) - i, nil
  5871. }
  5872. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5873. size := m.Size()
  5874. dAtA = make([]byte, size)
  5875. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5876. if err != nil {
  5877. return nil, err
  5878. }
  5879. return dAtA[:n], nil
  5880. }
  5881. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5882. size := m.Size()
  5883. return m.MarshalToSizedBuffer(dAtA[:size])
  5884. }
  5885. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5886. i := len(dAtA)
  5887. _ = i
  5888. var l int
  5889. _ = l
  5890. if m.SignedLastBlock {
  5891. i--
  5892. if m.SignedLastBlock {
  5893. dAtA[i] = 1
  5894. } else {
  5895. dAtA[i] = 0
  5896. }
  5897. i--
  5898. dAtA[i] = 0x10
  5899. }
  5900. {
  5901. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5902. if err != nil {
  5903. return 0, err
  5904. }
  5905. i -= size
  5906. i = encodeVarintTypes(dAtA, i, uint64(size))
  5907. }
  5908. i--
  5909. dAtA[i] = 0xa
  5910. return len(dAtA) - i, nil
  5911. }
  5912. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5913. size := m.Size()
  5914. dAtA = make([]byte, size)
  5915. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5916. if err != nil {
  5917. return nil, err
  5918. }
  5919. return dAtA[:n], nil
  5920. }
  5921. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5922. size := m.Size()
  5923. return m.MarshalToSizedBuffer(dAtA[:size])
  5924. }
  5925. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5926. i := len(dAtA)
  5927. _ = i
  5928. var l int
  5929. _ = l
  5930. if m.TotalVotingPower != 0 {
  5931. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5932. i--
  5933. dAtA[i] = 0x28
  5934. }
  5935. n49, err49 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5936. if err49 != nil {
  5937. return 0, err49
  5938. }
  5939. i -= n49
  5940. i = encodeVarintTypes(dAtA, i, uint64(n49))
  5941. i--
  5942. dAtA[i] = 0x22
  5943. if m.Height != 0 {
  5944. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5945. i--
  5946. dAtA[i] = 0x18
  5947. }
  5948. {
  5949. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5950. if err != nil {
  5951. return 0, err
  5952. }
  5953. i -= size
  5954. i = encodeVarintTypes(dAtA, i, uint64(size))
  5955. }
  5956. i--
  5957. dAtA[i] = 0x12
  5958. if m.Type != 0 {
  5959. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5960. i--
  5961. dAtA[i] = 0x8
  5962. }
  5963. return len(dAtA) - i, nil
  5964. }
  5965. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5966. size := m.Size()
  5967. dAtA = make([]byte, size)
  5968. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5969. if err != nil {
  5970. return nil, err
  5971. }
  5972. return dAtA[:n], nil
  5973. }
  5974. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5975. size := m.Size()
  5976. return m.MarshalToSizedBuffer(dAtA[:size])
  5977. }
  5978. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5979. i := len(dAtA)
  5980. _ = i
  5981. var l int
  5982. _ = l
  5983. if len(m.Metadata) > 0 {
  5984. i -= len(m.Metadata)
  5985. copy(dAtA[i:], m.Metadata)
  5986. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5987. i--
  5988. dAtA[i] = 0x2a
  5989. }
  5990. if len(m.Hash) > 0 {
  5991. i -= len(m.Hash)
  5992. copy(dAtA[i:], m.Hash)
  5993. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5994. i--
  5995. dAtA[i] = 0x22
  5996. }
  5997. if m.Chunks != 0 {
  5998. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5999. i--
  6000. dAtA[i] = 0x18
  6001. }
  6002. if m.Format != 0 {
  6003. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  6004. i--
  6005. dAtA[i] = 0x10
  6006. }
  6007. if m.Height != 0 {
  6008. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  6009. i--
  6010. dAtA[i] = 0x8
  6011. }
  6012. return len(dAtA) - i, nil
  6013. }
  6014. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  6015. offset -= sovTypes(v)
  6016. base := offset
  6017. for v >= 1<<7 {
  6018. dAtA[offset] = uint8(v&0x7f | 0x80)
  6019. v >>= 7
  6020. offset++
  6021. }
  6022. dAtA[offset] = uint8(v)
  6023. return base
  6024. }
  6025. func (m *Request) Size() (n int) {
  6026. if m == nil {
  6027. return 0
  6028. }
  6029. var l int
  6030. _ = l
  6031. if m.Value != nil {
  6032. n += m.Value.Size()
  6033. }
  6034. return n
  6035. }
  6036. func (m *Request_Echo) Size() (n int) {
  6037. if m == nil {
  6038. return 0
  6039. }
  6040. var l int
  6041. _ = l
  6042. if m.Echo != nil {
  6043. l = m.Echo.Size()
  6044. n += 1 + l + sovTypes(uint64(l))
  6045. }
  6046. return n
  6047. }
  6048. func (m *Request_Flush) Size() (n int) {
  6049. if m == nil {
  6050. return 0
  6051. }
  6052. var l int
  6053. _ = l
  6054. if m.Flush != nil {
  6055. l = m.Flush.Size()
  6056. n += 1 + l + sovTypes(uint64(l))
  6057. }
  6058. return n
  6059. }
  6060. func (m *Request_Info) Size() (n int) {
  6061. if m == nil {
  6062. return 0
  6063. }
  6064. var l int
  6065. _ = l
  6066. if m.Info != nil {
  6067. l = m.Info.Size()
  6068. n += 1 + l + sovTypes(uint64(l))
  6069. }
  6070. return n
  6071. }
  6072. func (m *Request_SetOption) Size() (n int) {
  6073. if m == nil {
  6074. return 0
  6075. }
  6076. var l int
  6077. _ = l
  6078. if m.SetOption != nil {
  6079. l = m.SetOption.Size()
  6080. n += 1 + l + sovTypes(uint64(l))
  6081. }
  6082. return n
  6083. }
  6084. func (m *Request_InitChain) Size() (n int) {
  6085. if m == nil {
  6086. return 0
  6087. }
  6088. var l int
  6089. _ = l
  6090. if m.InitChain != nil {
  6091. l = m.InitChain.Size()
  6092. n += 1 + l + sovTypes(uint64(l))
  6093. }
  6094. return n
  6095. }
  6096. func (m *Request_Query) Size() (n int) {
  6097. if m == nil {
  6098. return 0
  6099. }
  6100. var l int
  6101. _ = l
  6102. if m.Query != nil {
  6103. l = m.Query.Size()
  6104. n += 1 + l + sovTypes(uint64(l))
  6105. }
  6106. return n
  6107. }
  6108. func (m *Request_BeginBlock) Size() (n int) {
  6109. if m == nil {
  6110. return 0
  6111. }
  6112. var l int
  6113. _ = l
  6114. if m.BeginBlock != nil {
  6115. l = m.BeginBlock.Size()
  6116. n += 1 + l + sovTypes(uint64(l))
  6117. }
  6118. return n
  6119. }
  6120. func (m *Request_CheckTx) Size() (n int) {
  6121. if m == nil {
  6122. return 0
  6123. }
  6124. var l int
  6125. _ = l
  6126. if m.CheckTx != nil {
  6127. l = m.CheckTx.Size()
  6128. n += 1 + l + sovTypes(uint64(l))
  6129. }
  6130. return n
  6131. }
  6132. func (m *Request_DeliverTx) Size() (n int) {
  6133. if m == nil {
  6134. return 0
  6135. }
  6136. var l int
  6137. _ = l
  6138. if m.DeliverTx != nil {
  6139. l = m.DeliverTx.Size()
  6140. n += 1 + l + sovTypes(uint64(l))
  6141. }
  6142. return n
  6143. }
  6144. func (m *Request_EndBlock) Size() (n int) {
  6145. if m == nil {
  6146. return 0
  6147. }
  6148. var l int
  6149. _ = l
  6150. if m.EndBlock != nil {
  6151. l = m.EndBlock.Size()
  6152. n += 1 + l + sovTypes(uint64(l))
  6153. }
  6154. return n
  6155. }
  6156. func (m *Request_Commit) Size() (n int) {
  6157. if m == nil {
  6158. return 0
  6159. }
  6160. var l int
  6161. _ = l
  6162. if m.Commit != nil {
  6163. l = m.Commit.Size()
  6164. n += 1 + l + sovTypes(uint64(l))
  6165. }
  6166. return n
  6167. }
  6168. func (m *Request_ListSnapshots) Size() (n int) {
  6169. if m == nil {
  6170. return 0
  6171. }
  6172. var l int
  6173. _ = l
  6174. if m.ListSnapshots != nil {
  6175. l = m.ListSnapshots.Size()
  6176. n += 1 + l + sovTypes(uint64(l))
  6177. }
  6178. return n
  6179. }
  6180. func (m *Request_OfferSnapshot) Size() (n int) {
  6181. if m == nil {
  6182. return 0
  6183. }
  6184. var l int
  6185. _ = l
  6186. if m.OfferSnapshot != nil {
  6187. l = m.OfferSnapshot.Size()
  6188. n += 1 + l + sovTypes(uint64(l))
  6189. }
  6190. return n
  6191. }
  6192. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  6193. if m == nil {
  6194. return 0
  6195. }
  6196. var l int
  6197. _ = l
  6198. if m.LoadSnapshotChunk != nil {
  6199. l = m.LoadSnapshotChunk.Size()
  6200. n += 1 + l + sovTypes(uint64(l))
  6201. }
  6202. return n
  6203. }
  6204. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  6205. if m == nil {
  6206. return 0
  6207. }
  6208. var l int
  6209. _ = l
  6210. if m.ApplySnapshotChunk != nil {
  6211. l = m.ApplySnapshotChunk.Size()
  6212. n += 1 + l + sovTypes(uint64(l))
  6213. }
  6214. return n
  6215. }
  6216. func (m *RequestEcho) Size() (n int) {
  6217. if m == nil {
  6218. return 0
  6219. }
  6220. var l int
  6221. _ = l
  6222. l = len(m.Message)
  6223. if l > 0 {
  6224. n += 1 + l + sovTypes(uint64(l))
  6225. }
  6226. return n
  6227. }
  6228. func (m *RequestFlush) Size() (n int) {
  6229. if m == nil {
  6230. return 0
  6231. }
  6232. var l int
  6233. _ = l
  6234. return n
  6235. }
  6236. func (m *RequestInfo) Size() (n int) {
  6237. if m == nil {
  6238. return 0
  6239. }
  6240. var l int
  6241. _ = l
  6242. l = len(m.Version)
  6243. if l > 0 {
  6244. n += 1 + l + sovTypes(uint64(l))
  6245. }
  6246. if m.BlockVersion != 0 {
  6247. n += 1 + sovTypes(uint64(m.BlockVersion))
  6248. }
  6249. if m.P2PVersion != 0 {
  6250. n += 1 + sovTypes(uint64(m.P2PVersion))
  6251. }
  6252. return n
  6253. }
  6254. func (m *RequestSetOption) Size() (n int) {
  6255. if m == nil {
  6256. return 0
  6257. }
  6258. var l int
  6259. _ = l
  6260. l = len(m.Key)
  6261. if l > 0 {
  6262. n += 1 + l + sovTypes(uint64(l))
  6263. }
  6264. l = len(m.Value)
  6265. if l > 0 {
  6266. n += 1 + l + sovTypes(uint64(l))
  6267. }
  6268. return n
  6269. }
  6270. func (m *RequestInitChain) Size() (n int) {
  6271. if m == nil {
  6272. return 0
  6273. }
  6274. var l int
  6275. _ = l
  6276. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6277. n += 1 + l + sovTypes(uint64(l))
  6278. l = len(m.ChainId)
  6279. if l > 0 {
  6280. n += 1 + l + sovTypes(uint64(l))
  6281. }
  6282. if m.ConsensusParams != nil {
  6283. l = m.ConsensusParams.Size()
  6284. n += 1 + l + sovTypes(uint64(l))
  6285. }
  6286. if len(m.Validators) > 0 {
  6287. for _, e := range m.Validators {
  6288. l = e.Size()
  6289. n += 1 + l + sovTypes(uint64(l))
  6290. }
  6291. }
  6292. l = len(m.AppStateBytes)
  6293. if l > 0 {
  6294. n += 1 + l + sovTypes(uint64(l))
  6295. }
  6296. if m.InitialHeight != 0 {
  6297. n += 1 + sovTypes(uint64(m.InitialHeight))
  6298. }
  6299. return n
  6300. }
  6301. func (m *RequestQuery) Size() (n int) {
  6302. if m == nil {
  6303. return 0
  6304. }
  6305. var l int
  6306. _ = l
  6307. l = len(m.Data)
  6308. if l > 0 {
  6309. n += 1 + l + sovTypes(uint64(l))
  6310. }
  6311. l = len(m.Path)
  6312. if l > 0 {
  6313. n += 1 + l + sovTypes(uint64(l))
  6314. }
  6315. if m.Height != 0 {
  6316. n += 1 + sovTypes(uint64(m.Height))
  6317. }
  6318. if m.Prove {
  6319. n += 2
  6320. }
  6321. return n
  6322. }
  6323. func (m *RequestBeginBlock) Size() (n int) {
  6324. if m == nil {
  6325. return 0
  6326. }
  6327. var l int
  6328. _ = l
  6329. l = len(m.Hash)
  6330. if l > 0 {
  6331. n += 1 + l + sovTypes(uint64(l))
  6332. }
  6333. l = m.Header.Size()
  6334. n += 1 + l + sovTypes(uint64(l))
  6335. l = m.LastCommitInfo.Size()
  6336. n += 1 + l + sovTypes(uint64(l))
  6337. if len(m.ByzantineValidators) > 0 {
  6338. for _, e := range m.ByzantineValidators {
  6339. l = e.Size()
  6340. n += 1 + l + sovTypes(uint64(l))
  6341. }
  6342. }
  6343. return n
  6344. }
  6345. func (m *RequestCheckTx) Size() (n int) {
  6346. if m == nil {
  6347. return 0
  6348. }
  6349. var l int
  6350. _ = l
  6351. l = len(m.Tx)
  6352. if l > 0 {
  6353. n += 1 + l + sovTypes(uint64(l))
  6354. }
  6355. if m.Type != 0 {
  6356. n += 1 + sovTypes(uint64(m.Type))
  6357. }
  6358. return n
  6359. }
  6360. func (m *RequestDeliverTx) Size() (n int) {
  6361. if m == nil {
  6362. return 0
  6363. }
  6364. var l int
  6365. _ = l
  6366. l = len(m.Tx)
  6367. if l > 0 {
  6368. n += 1 + l + sovTypes(uint64(l))
  6369. }
  6370. return n
  6371. }
  6372. func (m *RequestEndBlock) Size() (n int) {
  6373. if m == nil {
  6374. return 0
  6375. }
  6376. var l int
  6377. _ = l
  6378. if m.Height != 0 {
  6379. n += 1 + sovTypes(uint64(m.Height))
  6380. }
  6381. return n
  6382. }
  6383. func (m *RequestCommit) Size() (n int) {
  6384. if m == nil {
  6385. return 0
  6386. }
  6387. var l int
  6388. _ = l
  6389. return n
  6390. }
  6391. func (m *RequestListSnapshots) Size() (n int) {
  6392. if m == nil {
  6393. return 0
  6394. }
  6395. var l int
  6396. _ = l
  6397. return n
  6398. }
  6399. func (m *RequestOfferSnapshot) Size() (n int) {
  6400. if m == nil {
  6401. return 0
  6402. }
  6403. var l int
  6404. _ = l
  6405. if m.Snapshot != nil {
  6406. l = m.Snapshot.Size()
  6407. n += 1 + l + sovTypes(uint64(l))
  6408. }
  6409. l = len(m.AppHash)
  6410. if l > 0 {
  6411. n += 1 + l + sovTypes(uint64(l))
  6412. }
  6413. return n
  6414. }
  6415. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  6416. if m == nil {
  6417. return 0
  6418. }
  6419. var l int
  6420. _ = l
  6421. if m.Height != 0 {
  6422. n += 1 + sovTypes(uint64(m.Height))
  6423. }
  6424. if m.Format != 0 {
  6425. n += 1 + sovTypes(uint64(m.Format))
  6426. }
  6427. if m.Chunk != 0 {
  6428. n += 1 + sovTypes(uint64(m.Chunk))
  6429. }
  6430. return n
  6431. }
  6432. func (m *RequestApplySnapshotChunk) Size() (n int) {
  6433. if m == nil {
  6434. return 0
  6435. }
  6436. var l int
  6437. _ = l
  6438. if m.Index != 0 {
  6439. n += 1 + sovTypes(uint64(m.Index))
  6440. }
  6441. l = len(m.Chunk)
  6442. if l > 0 {
  6443. n += 1 + l + sovTypes(uint64(l))
  6444. }
  6445. l = len(m.Sender)
  6446. if l > 0 {
  6447. n += 1 + l + sovTypes(uint64(l))
  6448. }
  6449. return n
  6450. }
  6451. func (m *Response) Size() (n int) {
  6452. if m == nil {
  6453. return 0
  6454. }
  6455. var l int
  6456. _ = l
  6457. if m.Value != nil {
  6458. n += m.Value.Size()
  6459. }
  6460. return n
  6461. }
  6462. func (m *Response_Exception) Size() (n int) {
  6463. if m == nil {
  6464. return 0
  6465. }
  6466. var l int
  6467. _ = l
  6468. if m.Exception != nil {
  6469. l = m.Exception.Size()
  6470. n += 1 + l + sovTypes(uint64(l))
  6471. }
  6472. return n
  6473. }
  6474. func (m *Response_Echo) Size() (n int) {
  6475. if m == nil {
  6476. return 0
  6477. }
  6478. var l int
  6479. _ = l
  6480. if m.Echo != nil {
  6481. l = m.Echo.Size()
  6482. n += 1 + l + sovTypes(uint64(l))
  6483. }
  6484. return n
  6485. }
  6486. func (m *Response_Flush) Size() (n int) {
  6487. if m == nil {
  6488. return 0
  6489. }
  6490. var l int
  6491. _ = l
  6492. if m.Flush != nil {
  6493. l = m.Flush.Size()
  6494. n += 1 + l + sovTypes(uint64(l))
  6495. }
  6496. return n
  6497. }
  6498. func (m *Response_Info) Size() (n int) {
  6499. if m == nil {
  6500. return 0
  6501. }
  6502. var l int
  6503. _ = l
  6504. if m.Info != nil {
  6505. l = m.Info.Size()
  6506. n += 1 + l + sovTypes(uint64(l))
  6507. }
  6508. return n
  6509. }
  6510. func (m *Response_SetOption) Size() (n int) {
  6511. if m == nil {
  6512. return 0
  6513. }
  6514. var l int
  6515. _ = l
  6516. if m.SetOption != nil {
  6517. l = m.SetOption.Size()
  6518. n += 1 + l + sovTypes(uint64(l))
  6519. }
  6520. return n
  6521. }
  6522. func (m *Response_InitChain) Size() (n int) {
  6523. if m == nil {
  6524. return 0
  6525. }
  6526. var l int
  6527. _ = l
  6528. if m.InitChain != nil {
  6529. l = m.InitChain.Size()
  6530. n += 1 + l + sovTypes(uint64(l))
  6531. }
  6532. return n
  6533. }
  6534. func (m *Response_Query) Size() (n int) {
  6535. if m == nil {
  6536. return 0
  6537. }
  6538. var l int
  6539. _ = l
  6540. if m.Query != nil {
  6541. l = m.Query.Size()
  6542. n += 1 + l + sovTypes(uint64(l))
  6543. }
  6544. return n
  6545. }
  6546. func (m *Response_BeginBlock) Size() (n int) {
  6547. if m == nil {
  6548. return 0
  6549. }
  6550. var l int
  6551. _ = l
  6552. if m.BeginBlock != nil {
  6553. l = m.BeginBlock.Size()
  6554. n += 1 + l + sovTypes(uint64(l))
  6555. }
  6556. return n
  6557. }
  6558. func (m *Response_CheckTx) Size() (n int) {
  6559. if m == nil {
  6560. return 0
  6561. }
  6562. var l int
  6563. _ = l
  6564. if m.CheckTx != nil {
  6565. l = m.CheckTx.Size()
  6566. n += 1 + l + sovTypes(uint64(l))
  6567. }
  6568. return n
  6569. }
  6570. func (m *Response_DeliverTx) Size() (n int) {
  6571. if m == nil {
  6572. return 0
  6573. }
  6574. var l int
  6575. _ = l
  6576. if m.DeliverTx != nil {
  6577. l = m.DeliverTx.Size()
  6578. n += 1 + l + sovTypes(uint64(l))
  6579. }
  6580. return n
  6581. }
  6582. func (m *Response_EndBlock) Size() (n int) {
  6583. if m == nil {
  6584. return 0
  6585. }
  6586. var l int
  6587. _ = l
  6588. if m.EndBlock != nil {
  6589. l = m.EndBlock.Size()
  6590. n += 1 + l + sovTypes(uint64(l))
  6591. }
  6592. return n
  6593. }
  6594. func (m *Response_Commit) Size() (n int) {
  6595. if m == nil {
  6596. return 0
  6597. }
  6598. var l int
  6599. _ = l
  6600. if m.Commit != nil {
  6601. l = m.Commit.Size()
  6602. n += 1 + l + sovTypes(uint64(l))
  6603. }
  6604. return n
  6605. }
  6606. func (m *Response_ListSnapshots) Size() (n int) {
  6607. if m == nil {
  6608. return 0
  6609. }
  6610. var l int
  6611. _ = l
  6612. if m.ListSnapshots != nil {
  6613. l = m.ListSnapshots.Size()
  6614. n += 1 + l + sovTypes(uint64(l))
  6615. }
  6616. return n
  6617. }
  6618. func (m *Response_OfferSnapshot) Size() (n int) {
  6619. if m == nil {
  6620. return 0
  6621. }
  6622. var l int
  6623. _ = l
  6624. if m.OfferSnapshot != nil {
  6625. l = m.OfferSnapshot.Size()
  6626. n += 1 + l + sovTypes(uint64(l))
  6627. }
  6628. return n
  6629. }
  6630. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6631. if m == nil {
  6632. return 0
  6633. }
  6634. var l int
  6635. _ = l
  6636. if m.LoadSnapshotChunk != nil {
  6637. l = m.LoadSnapshotChunk.Size()
  6638. n += 1 + l + sovTypes(uint64(l))
  6639. }
  6640. return n
  6641. }
  6642. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6643. if m == nil {
  6644. return 0
  6645. }
  6646. var l int
  6647. _ = l
  6648. if m.ApplySnapshotChunk != nil {
  6649. l = m.ApplySnapshotChunk.Size()
  6650. n += 2 + l + sovTypes(uint64(l))
  6651. }
  6652. return n
  6653. }
  6654. func (m *ResponseException) Size() (n int) {
  6655. if m == nil {
  6656. return 0
  6657. }
  6658. var l int
  6659. _ = l
  6660. l = len(m.Error)
  6661. if l > 0 {
  6662. n += 1 + l + sovTypes(uint64(l))
  6663. }
  6664. return n
  6665. }
  6666. func (m *ResponseEcho) Size() (n int) {
  6667. if m == nil {
  6668. return 0
  6669. }
  6670. var l int
  6671. _ = l
  6672. l = len(m.Message)
  6673. if l > 0 {
  6674. n += 1 + l + sovTypes(uint64(l))
  6675. }
  6676. return n
  6677. }
  6678. func (m *ResponseFlush) Size() (n int) {
  6679. if m == nil {
  6680. return 0
  6681. }
  6682. var l int
  6683. _ = l
  6684. return n
  6685. }
  6686. func (m *ResponseInfo) Size() (n int) {
  6687. if m == nil {
  6688. return 0
  6689. }
  6690. var l int
  6691. _ = l
  6692. l = len(m.Data)
  6693. if l > 0 {
  6694. n += 1 + l + sovTypes(uint64(l))
  6695. }
  6696. l = len(m.Version)
  6697. if l > 0 {
  6698. n += 1 + l + sovTypes(uint64(l))
  6699. }
  6700. if m.AppVersion != 0 {
  6701. n += 1 + sovTypes(uint64(m.AppVersion))
  6702. }
  6703. if m.LastBlockHeight != 0 {
  6704. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6705. }
  6706. l = len(m.LastBlockAppHash)
  6707. if l > 0 {
  6708. n += 1 + l + sovTypes(uint64(l))
  6709. }
  6710. return n
  6711. }
  6712. func (m *ResponseSetOption) Size() (n int) {
  6713. if m == nil {
  6714. return 0
  6715. }
  6716. var l int
  6717. _ = l
  6718. if m.Code != 0 {
  6719. n += 1 + sovTypes(uint64(m.Code))
  6720. }
  6721. l = len(m.Log)
  6722. if l > 0 {
  6723. n += 1 + l + sovTypes(uint64(l))
  6724. }
  6725. l = len(m.Info)
  6726. if l > 0 {
  6727. n += 1 + l + sovTypes(uint64(l))
  6728. }
  6729. return n
  6730. }
  6731. func (m *ResponseInitChain) Size() (n int) {
  6732. if m == nil {
  6733. return 0
  6734. }
  6735. var l int
  6736. _ = l
  6737. if m.ConsensusParams != nil {
  6738. l = m.ConsensusParams.Size()
  6739. n += 1 + l + sovTypes(uint64(l))
  6740. }
  6741. if len(m.Validators) > 0 {
  6742. for _, e := range m.Validators {
  6743. l = e.Size()
  6744. n += 1 + l + sovTypes(uint64(l))
  6745. }
  6746. }
  6747. l = len(m.AppHash)
  6748. if l > 0 {
  6749. n += 1 + l + sovTypes(uint64(l))
  6750. }
  6751. return n
  6752. }
  6753. func (m *ResponseQuery) Size() (n int) {
  6754. if m == nil {
  6755. return 0
  6756. }
  6757. var l int
  6758. _ = l
  6759. if m.Code != 0 {
  6760. n += 1 + sovTypes(uint64(m.Code))
  6761. }
  6762. l = len(m.Log)
  6763. if l > 0 {
  6764. n += 1 + l + sovTypes(uint64(l))
  6765. }
  6766. l = len(m.Info)
  6767. if l > 0 {
  6768. n += 1 + l + sovTypes(uint64(l))
  6769. }
  6770. if m.Index != 0 {
  6771. n += 1 + sovTypes(uint64(m.Index))
  6772. }
  6773. l = len(m.Key)
  6774. if l > 0 {
  6775. n += 1 + l + sovTypes(uint64(l))
  6776. }
  6777. l = len(m.Value)
  6778. if l > 0 {
  6779. n += 1 + l + sovTypes(uint64(l))
  6780. }
  6781. if m.ProofOps != nil {
  6782. l = m.ProofOps.Size()
  6783. n += 1 + l + sovTypes(uint64(l))
  6784. }
  6785. if m.Height != 0 {
  6786. n += 1 + sovTypes(uint64(m.Height))
  6787. }
  6788. l = len(m.Codespace)
  6789. if l > 0 {
  6790. n += 1 + l + sovTypes(uint64(l))
  6791. }
  6792. return n
  6793. }
  6794. func (m *ResponseBeginBlock) Size() (n int) {
  6795. if m == nil {
  6796. return 0
  6797. }
  6798. var l int
  6799. _ = l
  6800. if len(m.Events) > 0 {
  6801. for _, e := range m.Events {
  6802. l = e.Size()
  6803. n += 1 + l + sovTypes(uint64(l))
  6804. }
  6805. }
  6806. return n
  6807. }
  6808. func (m *ResponseCheckTx) Size() (n int) {
  6809. if m == nil {
  6810. return 0
  6811. }
  6812. var l int
  6813. _ = l
  6814. if m.Code != 0 {
  6815. n += 1 + sovTypes(uint64(m.Code))
  6816. }
  6817. l = len(m.Data)
  6818. if l > 0 {
  6819. n += 1 + l + sovTypes(uint64(l))
  6820. }
  6821. l = len(m.Log)
  6822. if l > 0 {
  6823. n += 1 + l + sovTypes(uint64(l))
  6824. }
  6825. l = len(m.Info)
  6826. if l > 0 {
  6827. n += 1 + l + sovTypes(uint64(l))
  6828. }
  6829. if m.GasWanted != 0 {
  6830. n += 1 + sovTypes(uint64(m.GasWanted))
  6831. }
  6832. if m.GasUsed != 0 {
  6833. n += 1 + sovTypes(uint64(m.GasUsed))
  6834. }
  6835. if len(m.Events) > 0 {
  6836. for _, e := range m.Events {
  6837. l = e.Size()
  6838. n += 1 + l + sovTypes(uint64(l))
  6839. }
  6840. }
  6841. l = len(m.Codespace)
  6842. if l > 0 {
  6843. n += 1 + l + sovTypes(uint64(l))
  6844. }
  6845. return n
  6846. }
  6847. func (m *ResponseDeliverTx) Size() (n int) {
  6848. if m == nil {
  6849. return 0
  6850. }
  6851. var l int
  6852. _ = l
  6853. if m.Code != 0 {
  6854. n += 1 + sovTypes(uint64(m.Code))
  6855. }
  6856. l = len(m.Data)
  6857. if l > 0 {
  6858. n += 1 + l + sovTypes(uint64(l))
  6859. }
  6860. l = len(m.Log)
  6861. if l > 0 {
  6862. n += 1 + l + sovTypes(uint64(l))
  6863. }
  6864. l = len(m.Info)
  6865. if l > 0 {
  6866. n += 1 + l + sovTypes(uint64(l))
  6867. }
  6868. if m.GasWanted != 0 {
  6869. n += 1 + sovTypes(uint64(m.GasWanted))
  6870. }
  6871. if m.GasUsed != 0 {
  6872. n += 1 + sovTypes(uint64(m.GasUsed))
  6873. }
  6874. if len(m.Events) > 0 {
  6875. for _, e := range m.Events {
  6876. l = e.Size()
  6877. n += 1 + l + sovTypes(uint64(l))
  6878. }
  6879. }
  6880. l = len(m.Codespace)
  6881. if l > 0 {
  6882. n += 1 + l + sovTypes(uint64(l))
  6883. }
  6884. return n
  6885. }
  6886. func (m *ResponseEndBlock) Size() (n int) {
  6887. if m == nil {
  6888. return 0
  6889. }
  6890. var l int
  6891. _ = l
  6892. if len(m.ValidatorUpdates) > 0 {
  6893. for _, e := range m.ValidatorUpdates {
  6894. l = e.Size()
  6895. n += 1 + l + sovTypes(uint64(l))
  6896. }
  6897. }
  6898. if m.ConsensusParamUpdates != nil {
  6899. l = m.ConsensusParamUpdates.Size()
  6900. n += 1 + l + sovTypes(uint64(l))
  6901. }
  6902. if len(m.Events) > 0 {
  6903. for _, e := range m.Events {
  6904. l = e.Size()
  6905. n += 1 + l + sovTypes(uint64(l))
  6906. }
  6907. }
  6908. return n
  6909. }
  6910. func (m *ResponseCommit) Size() (n int) {
  6911. if m == nil {
  6912. return 0
  6913. }
  6914. var l int
  6915. _ = l
  6916. l = len(m.Data)
  6917. if l > 0 {
  6918. n += 1 + l + sovTypes(uint64(l))
  6919. }
  6920. if m.RetainHeight != 0 {
  6921. n += 1 + sovTypes(uint64(m.RetainHeight))
  6922. }
  6923. return n
  6924. }
  6925. func (m *ResponseListSnapshots) Size() (n int) {
  6926. if m == nil {
  6927. return 0
  6928. }
  6929. var l int
  6930. _ = l
  6931. if len(m.Snapshots) > 0 {
  6932. for _, e := range m.Snapshots {
  6933. l = e.Size()
  6934. n += 1 + l + sovTypes(uint64(l))
  6935. }
  6936. }
  6937. return n
  6938. }
  6939. func (m *ResponseOfferSnapshot) Size() (n int) {
  6940. if m == nil {
  6941. return 0
  6942. }
  6943. var l int
  6944. _ = l
  6945. if m.Result != 0 {
  6946. n += 1 + sovTypes(uint64(m.Result))
  6947. }
  6948. return n
  6949. }
  6950. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6951. if m == nil {
  6952. return 0
  6953. }
  6954. var l int
  6955. _ = l
  6956. l = len(m.Chunk)
  6957. if l > 0 {
  6958. n += 1 + l + sovTypes(uint64(l))
  6959. }
  6960. return n
  6961. }
  6962. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6963. if m == nil {
  6964. return 0
  6965. }
  6966. var l int
  6967. _ = l
  6968. if m.Result != 0 {
  6969. n += 1 + sovTypes(uint64(m.Result))
  6970. }
  6971. if len(m.RefetchChunks) > 0 {
  6972. l = 0
  6973. for _, e := range m.RefetchChunks {
  6974. l += sovTypes(uint64(e))
  6975. }
  6976. n += 1 + sovTypes(uint64(l)) + l
  6977. }
  6978. if len(m.RejectSenders) > 0 {
  6979. for _, s := range m.RejectSenders {
  6980. l = len(s)
  6981. n += 1 + l + sovTypes(uint64(l))
  6982. }
  6983. }
  6984. return n
  6985. }
  6986. func (m *ConsensusParams) Size() (n int) {
  6987. if m == nil {
  6988. return 0
  6989. }
  6990. var l int
  6991. _ = l
  6992. if m.Block != nil {
  6993. l = m.Block.Size()
  6994. n += 1 + l + sovTypes(uint64(l))
  6995. }
  6996. if m.Evidence != nil {
  6997. l = m.Evidence.Size()
  6998. n += 1 + l + sovTypes(uint64(l))
  6999. }
  7000. if m.Validator != nil {
  7001. l = m.Validator.Size()
  7002. n += 1 + l + sovTypes(uint64(l))
  7003. }
  7004. if m.Version != nil {
  7005. l = m.Version.Size()
  7006. n += 1 + l + sovTypes(uint64(l))
  7007. }
  7008. return n
  7009. }
  7010. func (m *BlockParams) Size() (n int) {
  7011. if m == nil {
  7012. return 0
  7013. }
  7014. var l int
  7015. _ = l
  7016. if m.MaxBytes != 0 {
  7017. n += 1 + sovTypes(uint64(m.MaxBytes))
  7018. }
  7019. if m.MaxGas != 0 {
  7020. n += 1 + sovTypes(uint64(m.MaxGas))
  7021. }
  7022. return n
  7023. }
  7024. func (m *LastCommitInfo) Size() (n int) {
  7025. if m == nil {
  7026. return 0
  7027. }
  7028. var l int
  7029. _ = l
  7030. if m.Round != 0 {
  7031. n += 1 + sovTypes(uint64(m.Round))
  7032. }
  7033. if len(m.Votes) > 0 {
  7034. for _, e := range m.Votes {
  7035. l = e.Size()
  7036. n += 1 + l + sovTypes(uint64(l))
  7037. }
  7038. }
  7039. return n
  7040. }
  7041. func (m *Event) Size() (n int) {
  7042. if m == nil {
  7043. return 0
  7044. }
  7045. var l int
  7046. _ = l
  7047. l = len(m.Type)
  7048. if l > 0 {
  7049. n += 1 + l + sovTypes(uint64(l))
  7050. }
  7051. if len(m.Attributes) > 0 {
  7052. for _, e := range m.Attributes {
  7053. l = e.Size()
  7054. n += 1 + l + sovTypes(uint64(l))
  7055. }
  7056. }
  7057. return n
  7058. }
  7059. func (m *EventAttribute) Size() (n int) {
  7060. if m == nil {
  7061. return 0
  7062. }
  7063. var l int
  7064. _ = l
  7065. l = len(m.Key)
  7066. if l > 0 {
  7067. n += 1 + l + sovTypes(uint64(l))
  7068. }
  7069. l = len(m.Value)
  7070. if l > 0 {
  7071. n += 1 + l + sovTypes(uint64(l))
  7072. }
  7073. if m.Index {
  7074. n += 2
  7075. }
  7076. return n
  7077. }
  7078. func (m *TxResult) Size() (n int) {
  7079. if m == nil {
  7080. return 0
  7081. }
  7082. var l int
  7083. _ = l
  7084. if m.Height != 0 {
  7085. n += 1 + sovTypes(uint64(m.Height))
  7086. }
  7087. if m.Index != 0 {
  7088. n += 1 + sovTypes(uint64(m.Index))
  7089. }
  7090. l = len(m.Tx)
  7091. if l > 0 {
  7092. n += 1 + l + sovTypes(uint64(l))
  7093. }
  7094. l = m.Result.Size()
  7095. n += 1 + l + sovTypes(uint64(l))
  7096. return n
  7097. }
  7098. func (m *Validator) Size() (n int) {
  7099. if m == nil {
  7100. return 0
  7101. }
  7102. var l int
  7103. _ = l
  7104. l = len(m.Address)
  7105. if l > 0 {
  7106. n += 1 + l + sovTypes(uint64(l))
  7107. }
  7108. if m.Power != 0 {
  7109. n += 1 + sovTypes(uint64(m.Power))
  7110. }
  7111. return n
  7112. }
  7113. func (m *ValidatorUpdate) Size() (n int) {
  7114. if m == nil {
  7115. return 0
  7116. }
  7117. var l int
  7118. _ = l
  7119. l = m.PubKey.Size()
  7120. n += 1 + l + sovTypes(uint64(l))
  7121. if m.Power != 0 {
  7122. n += 1 + sovTypes(uint64(m.Power))
  7123. }
  7124. return n
  7125. }
  7126. func (m *VoteInfo) Size() (n int) {
  7127. if m == nil {
  7128. return 0
  7129. }
  7130. var l int
  7131. _ = l
  7132. l = m.Validator.Size()
  7133. n += 1 + l + sovTypes(uint64(l))
  7134. if m.SignedLastBlock {
  7135. n += 2
  7136. }
  7137. return n
  7138. }
  7139. func (m *Evidence) Size() (n int) {
  7140. if m == nil {
  7141. return 0
  7142. }
  7143. var l int
  7144. _ = l
  7145. if m.Type != 0 {
  7146. n += 1 + sovTypes(uint64(m.Type))
  7147. }
  7148. l = m.Validator.Size()
  7149. n += 1 + l + sovTypes(uint64(l))
  7150. if m.Height != 0 {
  7151. n += 1 + sovTypes(uint64(m.Height))
  7152. }
  7153. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  7154. n += 1 + l + sovTypes(uint64(l))
  7155. if m.TotalVotingPower != 0 {
  7156. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  7157. }
  7158. return n
  7159. }
  7160. func (m *Snapshot) Size() (n int) {
  7161. if m == nil {
  7162. return 0
  7163. }
  7164. var l int
  7165. _ = l
  7166. if m.Height != 0 {
  7167. n += 1 + sovTypes(uint64(m.Height))
  7168. }
  7169. if m.Format != 0 {
  7170. n += 1 + sovTypes(uint64(m.Format))
  7171. }
  7172. if m.Chunks != 0 {
  7173. n += 1 + sovTypes(uint64(m.Chunks))
  7174. }
  7175. l = len(m.Hash)
  7176. if l > 0 {
  7177. n += 1 + l + sovTypes(uint64(l))
  7178. }
  7179. l = len(m.Metadata)
  7180. if l > 0 {
  7181. n += 1 + l + sovTypes(uint64(l))
  7182. }
  7183. return n
  7184. }
  7185. func sovTypes(x uint64) (n int) {
  7186. return (math_bits.Len64(x|1) + 6) / 7
  7187. }
  7188. func sozTypes(x uint64) (n int) {
  7189. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  7190. }
  7191. func (m *Request) Unmarshal(dAtA []byte) error {
  7192. l := len(dAtA)
  7193. iNdEx := 0
  7194. for iNdEx < l {
  7195. preIndex := iNdEx
  7196. var wire uint64
  7197. for shift := uint(0); ; shift += 7 {
  7198. if shift >= 64 {
  7199. return ErrIntOverflowTypes
  7200. }
  7201. if iNdEx >= l {
  7202. return io.ErrUnexpectedEOF
  7203. }
  7204. b := dAtA[iNdEx]
  7205. iNdEx++
  7206. wire |= uint64(b&0x7F) << shift
  7207. if b < 0x80 {
  7208. break
  7209. }
  7210. }
  7211. fieldNum := int32(wire >> 3)
  7212. wireType := int(wire & 0x7)
  7213. if wireType == 4 {
  7214. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  7215. }
  7216. if fieldNum <= 0 {
  7217. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  7218. }
  7219. switch fieldNum {
  7220. case 1:
  7221. if wireType != 2 {
  7222. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  7223. }
  7224. var msglen int
  7225. for shift := uint(0); ; shift += 7 {
  7226. if shift >= 64 {
  7227. return ErrIntOverflowTypes
  7228. }
  7229. if iNdEx >= l {
  7230. return io.ErrUnexpectedEOF
  7231. }
  7232. b := dAtA[iNdEx]
  7233. iNdEx++
  7234. msglen |= int(b&0x7F) << shift
  7235. if b < 0x80 {
  7236. break
  7237. }
  7238. }
  7239. if msglen < 0 {
  7240. return ErrInvalidLengthTypes
  7241. }
  7242. postIndex := iNdEx + msglen
  7243. if postIndex < 0 {
  7244. return ErrInvalidLengthTypes
  7245. }
  7246. if postIndex > l {
  7247. return io.ErrUnexpectedEOF
  7248. }
  7249. v := &RequestEcho{}
  7250. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7251. return err
  7252. }
  7253. m.Value = &Request_Echo{v}
  7254. iNdEx = postIndex
  7255. case 2:
  7256. if wireType != 2 {
  7257. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  7258. }
  7259. var msglen int
  7260. for shift := uint(0); ; shift += 7 {
  7261. if shift >= 64 {
  7262. return ErrIntOverflowTypes
  7263. }
  7264. if iNdEx >= l {
  7265. return io.ErrUnexpectedEOF
  7266. }
  7267. b := dAtA[iNdEx]
  7268. iNdEx++
  7269. msglen |= int(b&0x7F) << shift
  7270. if b < 0x80 {
  7271. break
  7272. }
  7273. }
  7274. if msglen < 0 {
  7275. return ErrInvalidLengthTypes
  7276. }
  7277. postIndex := iNdEx + msglen
  7278. if postIndex < 0 {
  7279. return ErrInvalidLengthTypes
  7280. }
  7281. if postIndex > l {
  7282. return io.ErrUnexpectedEOF
  7283. }
  7284. v := &RequestFlush{}
  7285. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7286. return err
  7287. }
  7288. m.Value = &Request_Flush{v}
  7289. iNdEx = postIndex
  7290. case 3:
  7291. if wireType != 2 {
  7292. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  7293. }
  7294. var msglen int
  7295. for shift := uint(0); ; shift += 7 {
  7296. if shift >= 64 {
  7297. return ErrIntOverflowTypes
  7298. }
  7299. if iNdEx >= l {
  7300. return io.ErrUnexpectedEOF
  7301. }
  7302. b := dAtA[iNdEx]
  7303. iNdEx++
  7304. msglen |= int(b&0x7F) << shift
  7305. if b < 0x80 {
  7306. break
  7307. }
  7308. }
  7309. if msglen < 0 {
  7310. return ErrInvalidLengthTypes
  7311. }
  7312. postIndex := iNdEx + msglen
  7313. if postIndex < 0 {
  7314. return ErrInvalidLengthTypes
  7315. }
  7316. if postIndex > l {
  7317. return io.ErrUnexpectedEOF
  7318. }
  7319. v := &RequestInfo{}
  7320. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7321. return err
  7322. }
  7323. m.Value = &Request_Info{v}
  7324. iNdEx = postIndex
  7325. case 4:
  7326. if wireType != 2 {
  7327. return fmt.Errorf("proto: wrong wireType = %d for field SetOption", wireType)
  7328. }
  7329. var msglen int
  7330. for shift := uint(0); ; shift += 7 {
  7331. if shift >= 64 {
  7332. return ErrIntOverflowTypes
  7333. }
  7334. if iNdEx >= l {
  7335. return io.ErrUnexpectedEOF
  7336. }
  7337. b := dAtA[iNdEx]
  7338. iNdEx++
  7339. msglen |= int(b&0x7F) << shift
  7340. if b < 0x80 {
  7341. break
  7342. }
  7343. }
  7344. if msglen < 0 {
  7345. return ErrInvalidLengthTypes
  7346. }
  7347. postIndex := iNdEx + msglen
  7348. if postIndex < 0 {
  7349. return ErrInvalidLengthTypes
  7350. }
  7351. if postIndex > l {
  7352. return io.ErrUnexpectedEOF
  7353. }
  7354. v := &RequestSetOption{}
  7355. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7356. return err
  7357. }
  7358. m.Value = &Request_SetOption{v}
  7359. iNdEx = postIndex
  7360. case 5:
  7361. if wireType != 2 {
  7362. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  7363. }
  7364. var msglen int
  7365. for shift := uint(0); ; shift += 7 {
  7366. if shift >= 64 {
  7367. return ErrIntOverflowTypes
  7368. }
  7369. if iNdEx >= l {
  7370. return io.ErrUnexpectedEOF
  7371. }
  7372. b := dAtA[iNdEx]
  7373. iNdEx++
  7374. msglen |= int(b&0x7F) << shift
  7375. if b < 0x80 {
  7376. break
  7377. }
  7378. }
  7379. if msglen < 0 {
  7380. return ErrInvalidLengthTypes
  7381. }
  7382. postIndex := iNdEx + msglen
  7383. if postIndex < 0 {
  7384. return ErrInvalidLengthTypes
  7385. }
  7386. if postIndex > l {
  7387. return io.ErrUnexpectedEOF
  7388. }
  7389. v := &RequestInitChain{}
  7390. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7391. return err
  7392. }
  7393. m.Value = &Request_InitChain{v}
  7394. iNdEx = postIndex
  7395. case 6:
  7396. if wireType != 2 {
  7397. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  7398. }
  7399. var msglen int
  7400. for shift := uint(0); ; shift += 7 {
  7401. if shift >= 64 {
  7402. return ErrIntOverflowTypes
  7403. }
  7404. if iNdEx >= l {
  7405. return io.ErrUnexpectedEOF
  7406. }
  7407. b := dAtA[iNdEx]
  7408. iNdEx++
  7409. msglen |= int(b&0x7F) << shift
  7410. if b < 0x80 {
  7411. break
  7412. }
  7413. }
  7414. if msglen < 0 {
  7415. return ErrInvalidLengthTypes
  7416. }
  7417. postIndex := iNdEx + msglen
  7418. if postIndex < 0 {
  7419. return ErrInvalidLengthTypes
  7420. }
  7421. if postIndex > l {
  7422. return io.ErrUnexpectedEOF
  7423. }
  7424. v := &RequestQuery{}
  7425. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7426. return err
  7427. }
  7428. m.Value = &Request_Query{v}
  7429. iNdEx = postIndex
  7430. case 7:
  7431. if wireType != 2 {
  7432. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  7433. }
  7434. var msglen int
  7435. for shift := uint(0); ; shift += 7 {
  7436. if shift >= 64 {
  7437. return ErrIntOverflowTypes
  7438. }
  7439. if iNdEx >= l {
  7440. return io.ErrUnexpectedEOF
  7441. }
  7442. b := dAtA[iNdEx]
  7443. iNdEx++
  7444. msglen |= int(b&0x7F) << shift
  7445. if b < 0x80 {
  7446. break
  7447. }
  7448. }
  7449. if msglen < 0 {
  7450. return ErrInvalidLengthTypes
  7451. }
  7452. postIndex := iNdEx + msglen
  7453. if postIndex < 0 {
  7454. return ErrInvalidLengthTypes
  7455. }
  7456. if postIndex > l {
  7457. return io.ErrUnexpectedEOF
  7458. }
  7459. v := &RequestBeginBlock{}
  7460. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7461. return err
  7462. }
  7463. m.Value = &Request_BeginBlock{v}
  7464. iNdEx = postIndex
  7465. case 8:
  7466. if wireType != 2 {
  7467. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  7468. }
  7469. var msglen int
  7470. for shift := uint(0); ; shift += 7 {
  7471. if shift >= 64 {
  7472. return ErrIntOverflowTypes
  7473. }
  7474. if iNdEx >= l {
  7475. return io.ErrUnexpectedEOF
  7476. }
  7477. b := dAtA[iNdEx]
  7478. iNdEx++
  7479. msglen |= int(b&0x7F) << shift
  7480. if b < 0x80 {
  7481. break
  7482. }
  7483. }
  7484. if msglen < 0 {
  7485. return ErrInvalidLengthTypes
  7486. }
  7487. postIndex := iNdEx + msglen
  7488. if postIndex < 0 {
  7489. return ErrInvalidLengthTypes
  7490. }
  7491. if postIndex > l {
  7492. return io.ErrUnexpectedEOF
  7493. }
  7494. v := &RequestCheckTx{}
  7495. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7496. return err
  7497. }
  7498. m.Value = &Request_CheckTx{v}
  7499. iNdEx = postIndex
  7500. case 9:
  7501. if wireType != 2 {
  7502. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  7503. }
  7504. var msglen int
  7505. for shift := uint(0); ; shift += 7 {
  7506. if shift >= 64 {
  7507. return ErrIntOverflowTypes
  7508. }
  7509. if iNdEx >= l {
  7510. return io.ErrUnexpectedEOF
  7511. }
  7512. b := dAtA[iNdEx]
  7513. iNdEx++
  7514. msglen |= int(b&0x7F) << shift
  7515. if b < 0x80 {
  7516. break
  7517. }
  7518. }
  7519. if msglen < 0 {
  7520. return ErrInvalidLengthTypes
  7521. }
  7522. postIndex := iNdEx + msglen
  7523. if postIndex < 0 {
  7524. return ErrInvalidLengthTypes
  7525. }
  7526. if postIndex > l {
  7527. return io.ErrUnexpectedEOF
  7528. }
  7529. v := &RequestDeliverTx{}
  7530. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7531. return err
  7532. }
  7533. m.Value = &Request_DeliverTx{v}
  7534. iNdEx = postIndex
  7535. case 10:
  7536. if wireType != 2 {
  7537. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  7538. }
  7539. var msglen int
  7540. for shift := uint(0); ; shift += 7 {
  7541. if shift >= 64 {
  7542. return ErrIntOverflowTypes
  7543. }
  7544. if iNdEx >= l {
  7545. return io.ErrUnexpectedEOF
  7546. }
  7547. b := dAtA[iNdEx]
  7548. iNdEx++
  7549. msglen |= int(b&0x7F) << shift
  7550. if b < 0x80 {
  7551. break
  7552. }
  7553. }
  7554. if msglen < 0 {
  7555. return ErrInvalidLengthTypes
  7556. }
  7557. postIndex := iNdEx + msglen
  7558. if postIndex < 0 {
  7559. return ErrInvalidLengthTypes
  7560. }
  7561. if postIndex > l {
  7562. return io.ErrUnexpectedEOF
  7563. }
  7564. v := &RequestEndBlock{}
  7565. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7566. return err
  7567. }
  7568. m.Value = &Request_EndBlock{v}
  7569. iNdEx = postIndex
  7570. case 11:
  7571. if wireType != 2 {
  7572. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7573. }
  7574. var msglen int
  7575. for shift := uint(0); ; shift += 7 {
  7576. if shift >= 64 {
  7577. return ErrIntOverflowTypes
  7578. }
  7579. if iNdEx >= l {
  7580. return io.ErrUnexpectedEOF
  7581. }
  7582. b := dAtA[iNdEx]
  7583. iNdEx++
  7584. msglen |= int(b&0x7F) << shift
  7585. if b < 0x80 {
  7586. break
  7587. }
  7588. }
  7589. if msglen < 0 {
  7590. return ErrInvalidLengthTypes
  7591. }
  7592. postIndex := iNdEx + msglen
  7593. if postIndex < 0 {
  7594. return ErrInvalidLengthTypes
  7595. }
  7596. if postIndex > l {
  7597. return io.ErrUnexpectedEOF
  7598. }
  7599. v := &RequestCommit{}
  7600. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7601. return err
  7602. }
  7603. m.Value = &Request_Commit{v}
  7604. iNdEx = postIndex
  7605. case 12:
  7606. if wireType != 2 {
  7607. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7608. }
  7609. var msglen int
  7610. for shift := uint(0); ; shift += 7 {
  7611. if shift >= 64 {
  7612. return ErrIntOverflowTypes
  7613. }
  7614. if iNdEx >= l {
  7615. return io.ErrUnexpectedEOF
  7616. }
  7617. b := dAtA[iNdEx]
  7618. iNdEx++
  7619. msglen |= int(b&0x7F) << shift
  7620. if b < 0x80 {
  7621. break
  7622. }
  7623. }
  7624. if msglen < 0 {
  7625. return ErrInvalidLengthTypes
  7626. }
  7627. postIndex := iNdEx + msglen
  7628. if postIndex < 0 {
  7629. return ErrInvalidLengthTypes
  7630. }
  7631. if postIndex > l {
  7632. return io.ErrUnexpectedEOF
  7633. }
  7634. v := &RequestListSnapshots{}
  7635. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7636. return err
  7637. }
  7638. m.Value = &Request_ListSnapshots{v}
  7639. iNdEx = postIndex
  7640. case 13:
  7641. if wireType != 2 {
  7642. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7643. }
  7644. var msglen int
  7645. for shift := uint(0); ; shift += 7 {
  7646. if shift >= 64 {
  7647. return ErrIntOverflowTypes
  7648. }
  7649. if iNdEx >= l {
  7650. return io.ErrUnexpectedEOF
  7651. }
  7652. b := dAtA[iNdEx]
  7653. iNdEx++
  7654. msglen |= int(b&0x7F) << shift
  7655. if b < 0x80 {
  7656. break
  7657. }
  7658. }
  7659. if msglen < 0 {
  7660. return ErrInvalidLengthTypes
  7661. }
  7662. postIndex := iNdEx + msglen
  7663. if postIndex < 0 {
  7664. return ErrInvalidLengthTypes
  7665. }
  7666. if postIndex > l {
  7667. return io.ErrUnexpectedEOF
  7668. }
  7669. v := &RequestOfferSnapshot{}
  7670. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7671. return err
  7672. }
  7673. m.Value = &Request_OfferSnapshot{v}
  7674. iNdEx = postIndex
  7675. case 14:
  7676. if wireType != 2 {
  7677. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7678. }
  7679. var msglen int
  7680. for shift := uint(0); ; shift += 7 {
  7681. if shift >= 64 {
  7682. return ErrIntOverflowTypes
  7683. }
  7684. if iNdEx >= l {
  7685. return io.ErrUnexpectedEOF
  7686. }
  7687. b := dAtA[iNdEx]
  7688. iNdEx++
  7689. msglen |= int(b&0x7F) << shift
  7690. if b < 0x80 {
  7691. break
  7692. }
  7693. }
  7694. if msglen < 0 {
  7695. return ErrInvalidLengthTypes
  7696. }
  7697. postIndex := iNdEx + msglen
  7698. if postIndex < 0 {
  7699. return ErrInvalidLengthTypes
  7700. }
  7701. if postIndex > l {
  7702. return io.ErrUnexpectedEOF
  7703. }
  7704. v := &RequestLoadSnapshotChunk{}
  7705. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7706. return err
  7707. }
  7708. m.Value = &Request_LoadSnapshotChunk{v}
  7709. iNdEx = postIndex
  7710. case 15:
  7711. if wireType != 2 {
  7712. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7713. }
  7714. var msglen int
  7715. for shift := uint(0); ; shift += 7 {
  7716. if shift >= 64 {
  7717. return ErrIntOverflowTypes
  7718. }
  7719. if iNdEx >= l {
  7720. return io.ErrUnexpectedEOF
  7721. }
  7722. b := dAtA[iNdEx]
  7723. iNdEx++
  7724. msglen |= int(b&0x7F) << shift
  7725. if b < 0x80 {
  7726. break
  7727. }
  7728. }
  7729. if msglen < 0 {
  7730. return ErrInvalidLengthTypes
  7731. }
  7732. postIndex := iNdEx + msglen
  7733. if postIndex < 0 {
  7734. return ErrInvalidLengthTypes
  7735. }
  7736. if postIndex > l {
  7737. return io.ErrUnexpectedEOF
  7738. }
  7739. v := &RequestApplySnapshotChunk{}
  7740. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7741. return err
  7742. }
  7743. m.Value = &Request_ApplySnapshotChunk{v}
  7744. iNdEx = postIndex
  7745. default:
  7746. iNdEx = preIndex
  7747. skippy, err := skipTypes(dAtA[iNdEx:])
  7748. if err != nil {
  7749. return err
  7750. }
  7751. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7752. return ErrInvalidLengthTypes
  7753. }
  7754. if (iNdEx + skippy) > l {
  7755. return io.ErrUnexpectedEOF
  7756. }
  7757. iNdEx += skippy
  7758. }
  7759. }
  7760. if iNdEx > l {
  7761. return io.ErrUnexpectedEOF
  7762. }
  7763. return nil
  7764. }
  7765. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7766. l := len(dAtA)
  7767. iNdEx := 0
  7768. for iNdEx < l {
  7769. preIndex := iNdEx
  7770. var wire uint64
  7771. for shift := uint(0); ; shift += 7 {
  7772. if shift >= 64 {
  7773. return ErrIntOverflowTypes
  7774. }
  7775. if iNdEx >= l {
  7776. return io.ErrUnexpectedEOF
  7777. }
  7778. b := dAtA[iNdEx]
  7779. iNdEx++
  7780. wire |= uint64(b&0x7F) << shift
  7781. if b < 0x80 {
  7782. break
  7783. }
  7784. }
  7785. fieldNum := int32(wire >> 3)
  7786. wireType := int(wire & 0x7)
  7787. if wireType == 4 {
  7788. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7789. }
  7790. if fieldNum <= 0 {
  7791. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7792. }
  7793. switch fieldNum {
  7794. case 1:
  7795. if wireType != 2 {
  7796. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7797. }
  7798. var stringLen uint64
  7799. for shift := uint(0); ; shift += 7 {
  7800. if shift >= 64 {
  7801. return ErrIntOverflowTypes
  7802. }
  7803. if iNdEx >= l {
  7804. return io.ErrUnexpectedEOF
  7805. }
  7806. b := dAtA[iNdEx]
  7807. iNdEx++
  7808. stringLen |= uint64(b&0x7F) << shift
  7809. if b < 0x80 {
  7810. break
  7811. }
  7812. }
  7813. intStringLen := int(stringLen)
  7814. if intStringLen < 0 {
  7815. return ErrInvalidLengthTypes
  7816. }
  7817. postIndex := iNdEx + intStringLen
  7818. if postIndex < 0 {
  7819. return ErrInvalidLengthTypes
  7820. }
  7821. if postIndex > l {
  7822. return io.ErrUnexpectedEOF
  7823. }
  7824. m.Message = string(dAtA[iNdEx:postIndex])
  7825. iNdEx = postIndex
  7826. default:
  7827. iNdEx = preIndex
  7828. skippy, err := skipTypes(dAtA[iNdEx:])
  7829. if err != nil {
  7830. return err
  7831. }
  7832. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7833. return ErrInvalidLengthTypes
  7834. }
  7835. if (iNdEx + skippy) > l {
  7836. return io.ErrUnexpectedEOF
  7837. }
  7838. iNdEx += skippy
  7839. }
  7840. }
  7841. if iNdEx > l {
  7842. return io.ErrUnexpectedEOF
  7843. }
  7844. return nil
  7845. }
  7846. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7847. l := len(dAtA)
  7848. iNdEx := 0
  7849. for iNdEx < l {
  7850. preIndex := iNdEx
  7851. var wire uint64
  7852. for shift := uint(0); ; shift += 7 {
  7853. if shift >= 64 {
  7854. return ErrIntOverflowTypes
  7855. }
  7856. if iNdEx >= l {
  7857. return io.ErrUnexpectedEOF
  7858. }
  7859. b := dAtA[iNdEx]
  7860. iNdEx++
  7861. wire |= uint64(b&0x7F) << shift
  7862. if b < 0x80 {
  7863. break
  7864. }
  7865. }
  7866. fieldNum := int32(wire >> 3)
  7867. wireType := int(wire & 0x7)
  7868. if wireType == 4 {
  7869. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7870. }
  7871. if fieldNum <= 0 {
  7872. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7873. }
  7874. switch fieldNum {
  7875. default:
  7876. iNdEx = preIndex
  7877. skippy, err := skipTypes(dAtA[iNdEx:])
  7878. if err != nil {
  7879. return err
  7880. }
  7881. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7882. return ErrInvalidLengthTypes
  7883. }
  7884. if (iNdEx + skippy) > l {
  7885. return io.ErrUnexpectedEOF
  7886. }
  7887. iNdEx += skippy
  7888. }
  7889. }
  7890. if iNdEx > l {
  7891. return io.ErrUnexpectedEOF
  7892. }
  7893. return nil
  7894. }
  7895. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7896. l := len(dAtA)
  7897. iNdEx := 0
  7898. for iNdEx < l {
  7899. preIndex := iNdEx
  7900. var wire uint64
  7901. for shift := uint(0); ; shift += 7 {
  7902. if shift >= 64 {
  7903. return ErrIntOverflowTypes
  7904. }
  7905. if iNdEx >= l {
  7906. return io.ErrUnexpectedEOF
  7907. }
  7908. b := dAtA[iNdEx]
  7909. iNdEx++
  7910. wire |= uint64(b&0x7F) << shift
  7911. if b < 0x80 {
  7912. break
  7913. }
  7914. }
  7915. fieldNum := int32(wire >> 3)
  7916. wireType := int(wire & 0x7)
  7917. if wireType == 4 {
  7918. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7919. }
  7920. if fieldNum <= 0 {
  7921. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7922. }
  7923. switch fieldNum {
  7924. case 1:
  7925. if wireType != 2 {
  7926. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7927. }
  7928. var stringLen uint64
  7929. for shift := uint(0); ; shift += 7 {
  7930. if shift >= 64 {
  7931. return ErrIntOverflowTypes
  7932. }
  7933. if iNdEx >= l {
  7934. return io.ErrUnexpectedEOF
  7935. }
  7936. b := dAtA[iNdEx]
  7937. iNdEx++
  7938. stringLen |= uint64(b&0x7F) << shift
  7939. if b < 0x80 {
  7940. break
  7941. }
  7942. }
  7943. intStringLen := int(stringLen)
  7944. if intStringLen < 0 {
  7945. return ErrInvalidLengthTypes
  7946. }
  7947. postIndex := iNdEx + intStringLen
  7948. if postIndex < 0 {
  7949. return ErrInvalidLengthTypes
  7950. }
  7951. if postIndex > l {
  7952. return io.ErrUnexpectedEOF
  7953. }
  7954. m.Version = string(dAtA[iNdEx:postIndex])
  7955. iNdEx = postIndex
  7956. case 2:
  7957. if wireType != 0 {
  7958. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7959. }
  7960. m.BlockVersion = 0
  7961. for shift := uint(0); ; shift += 7 {
  7962. if shift >= 64 {
  7963. return ErrIntOverflowTypes
  7964. }
  7965. if iNdEx >= l {
  7966. return io.ErrUnexpectedEOF
  7967. }
  7968. b := dAtA[iNdEx]
  7969. iNdEx++
  7970. m.BlockVersion |= uint64(b&0x7F) << shift
  7971. if b < 0x80 {
  7972. break
  7973. }
  7974. }
  7975. case 3:
  7976. if wireType != 0 {
  7977. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7978. }
  7979. m.P2PVersion = 0
  7980. for shift := uint(0); ; shift += 7 {
  7981. if shift >= 64 {
  7982. return ErrIntOverflowTypes
  7983. }
  7984. if iNdEx >= l {
  7985. return io.ErrUnexpectedEOF
  7986. }
  7987. b := dAtA[iNdEx]
  7988. iNdEx++
  7989. m.P2PVersion |= uint64(b&0x7F) << shift
  7990. if b < 0x80 {
  7991. break
  7992. }
  7993. }
  7994. default:
  7995. iNdEx = preIndex
  7996. skippy, err := skipTypes(dAtA[iNdEx:])
  7997. if err != nil {
  7998. return err
  7999. }
  8000. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8001. return ErrInvalidLengthTypes
  8002. }
  8003. if (iNdEx + skippy) > l {
  8004. return io.ErrUnexpectedEOF
  8005. }
  8006. iNdEx += skippy
  8007. }
  8008. }
  8009. if iNdEx > l {
  8010. return io.ErrUnexpectedEOF
  8011. }
  8012. return nil
  8013. }
  8014. func (m *RequestSetOption) Unmarshal(dAtA []byte) error {
  8015. l := len(dAtA)
  8016. iNdEx := 0
  8017. for iNdEx < l {
  8018. preIndex := iNdEx
  8019. var wire uint64
  8020. for shift := uint(0); ; shift += 7 {
  8021. if shift >= 64 {
  8022. return ErrIntOverflowTypes
  8023. }
  8024. if iNdEx >= l {
  8025. return io.ErrUnexpectedEOF
  8026. }
  8027. b := dAtA[iNdEx]
  8028. iNdEx++
  8029. wire |= uint64(b&0x7F) << shift
  8030. if b < 0x80 {
  8031. break
  8032. }
  8033. }
  8034. fieldNum := int32(wire >> 3)
  8035. wireType := int(wire & 0x7)
  8036. if wireType == 4 {
  8037. return fmt.Errorf("proto: RequestSetOption: wiretype end group for non-group")
  8038. }
  8039. if fieldNum <= 0 {
  8040. return fmt.Errorf("proto: RequestSetOption: illegal tag %d (wire type %d)", fieldNum, wire)
  8041. }
  8042. switch fieldNum {
  8043. case 1:
  8044. if wireType != 2 {
  8045. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  8046. }
  8047. var stringLen uint64
  8048. for shift := uint(0); ; shift += 7 {
  8049. if shift >= 64 {
  8050. return ErrIntOverflowTypes
  8051. }
  8052. if iNdEx >= l {
  8053. return io.ErrUnexpectedEOF
  8054. }
  8055. b := dAtA[iNdEx]
  8056. iNdEx++
  8057. stringLen |= uint64(b&0x7F) << shift
  8058. if b < 0x80 {
  8059. break
  8060. }
  8061. }
  8062. intStringLen := int(stringLen)
  8063. if intStringLen < 0 {
  8064. return ErrInvalidLengthTypes
  8065. }
  8066. postIndex := iNdEx + intStringLen
  8067. if postIndex < 0 {
  8068. return ErrInvalidLengthTypes
  8069. }
  8070. if postIndex > l {
  8071. return io.ErrUnexpectedEOF
  8072. }
  8073. m.Key = string(dAtA[iNdEx:postIndex])
  8074. iNdEx = postIndex
  8075. case 2:
  8076. if wireType != 2 {
  8077. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  8078. }
  8079. var stringLen uint64
  8080. for shift := uint(0); ; shift += 7 {
  8081. if shift >= 64 {
  8082. return ErrIntOverflowTypes
  8083. }
  8084. if iNdEx >= l {
  8085. return io.ErrUnexpectedEOF
  8086. }
  8087. b := dAtA[iNdEx]
  8088. iNdEx++
  8089. stringLen |= uint64(b&0x7F) << shift
  8090. if b < 0x80 {
  8091. break
  8092. }
  8093. }
  8094. intStringLen := int(stringLen)
  8095. if intStringLen < 0 {
  8096. return ErrInvalidLengthTypes
  8097. }
  8098. postIndex := iNdEx + intStringLen
  8099. if postIndex < 0 {
  8100. return ErrInvalidLengthTypes
  8101. }
  8102. if postIndex > l {
  8103. return io.ErrUnexpectedEOF
  8104. }
  8105. m.Value = string(dAtA[iNdEx:postIndex])
  8106. iNdEx = postIndex
  8107. default:
  8108. iNdEx = preIndex
  8109. skippy, err := skipTypes(dAtA[iNdEx:])
  8110. if err != nil {
  8111. return err
  8112. }
  8113. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8114. return ErrInvalidLengthTypes
  8115. }
  8116. if (iNdEx + skippy) > l {
  8117. return io.ErrUnexpectedEOF
  8118. }
  8119. iNdEx += skippy
  8120. }
  8121. }
  8122. if iNdEx > l {
  8123. return io.ErrUnexpectedEOF
  8124. }
  8125. return nil
  8126. }
  8127. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  8128. l := len(dAtA)
  8129. iNdEx := 0
  8130. for iNdEx < l {
  8131. preIndex := iNdEx
  8132. var wire uint64
  8133. for shift := uint(0); ; shift += 7 {
  8134. if shift >= 64 {
  8135. return ErrIntOverflowTypes
  8136. }
  8137. if iNdEx >= l {
  8138. return io.ErrUnexpectedEOF
  8139. }
  8140. b := dAtA[iNdEx]
  8141. iNdEx++
  8142. wire |= uint64(b&0x7F) << shift
  8143. if b < 0x80 {
  8144. break
  8145. }
  8146. }
  8147. fieldNum := int32(wire >> 3)
  8148. wireType := int(wire & 0x7)
  8149. if wireType == 4 {
  8150. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  8151. }
  8152. if fieldNum <= 0 {
  8153. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  8154. }
  8155. switch fieldNum {
  8156. case 1:
  8157. if wireType != 2 {
  8158. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  8159. }
  8160. var msglen int
  8161. for shift := uint(0); ; shift += 7 {
  8162. if shift >= 64 {
  8163. return ErrIntOverflowTypes
  8164. }
  8165. if iNdEx >= l {
  8166. return io.ErrUnexpectedEOF
  8167. }
  8168. b := dAtA[iNdEx]
  8169. iNdEx++
  8170. msglen |= int(b&0x7F) << shift
  8171. if b < 0x80 {
  8172. break
  8173. }
  8174. }
  8175. if msglen < 0 {
  8176. return ErrInvalidLengthTypes
  8177. }
  8178. postIndex := iNdEx + msglen
  8179. if postIndex < 0 {
  8180. return ErrInvalidLengthTypes
  8181. }
  8182. if postIndex > l {
  8183. return io.ErrUnexpectedEOF
  8184. }
  8185. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  8186. return err
  8187. }
  8188. iNdEx = postIndex
  8189. case 2:
  8190. if wireType != 2 {
  8191. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  8192. }
  8193. var stringLen uint64
  8194. for shift := uint(0); ; shift += 7 {
  8195. if shift >= 64 {
  8196. return ErrIntOverflowTypes
  8197. }
  8198. if iNdEx >= l {
  8199. return io.ErrUnexpectedEOF
  8200. }
  8201. b := dAtA[iNdEx]
  8202. iNdEx++
  8203. stringLen |= uint64(b&0x7F) << shift
  8204. if b < 0x80 {
  8205. break
  8206. }
  8207. }
  8208. intStringLen := int(stringLen)
  8209. if intStringLen < 0 {
  8210. return ErrInvalidLengthTypes
  8211. }
  8212. postIndex := iNdEx + intStringLen
  8213. if postIndex < 0 {
  8214. return ErrInvalidLengthTypes
  8215. }
  8216. if postIndex > l {
  8217. return io.ErrUnexpectedEOF
  8218. }
  8219. m.ChainId = string(dAtA[iNdEx:postIndex])
  8220. iNdEx = postIndex
  8221. case 3:
  8222. if wireType != 2 {
  8223. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  8224. }
  8225. var msglen int
  8226. for shift := uint(0); ; shift += 7 {
  8227. if shift >= 64 {
  8228. return ErrIntOverflowTypes
  8229. }
  8230. if iNdEx >= l {
  8231. return io.ErrUnexpectedEOF
  8232. }
  8233. b := dAtA[iNdEx]
  8234. iNdEx++
  8235. msglen |= int(b&0x7F) << shift
  8236. if b < 0x80 {
  8237. break
  8238. }
  8239. }
  8240. if msglen < 0 {
  8241. return ErrInvalidLengthTypes
  8242. }
  8243. postIndex := iNdEx + msglen
  8244. if postIndex < 0 {
  8245. return ErrInvalidLengthTypes
  8246. }
  8247. if postIndex > l {
  8248. return io.ErrUnexpectedEOF
  8249. }
  8250. if m.ConsensusParams == nil {
  8251. m.ConsensusParams = &ConsensusParams{}
  8252. }
  8253. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8254. return err
  8255. }
  8256. iNdEx = postIndex
  8257. case 4:
  8258. if wireType != 2 {
  8259. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  8260. }
  8261. var msglen int
  8262. for shift := uint(0); ; shift += 7 {
  8263. if shift >= 64 {
  8264. return ErrIntOverflowTypes
  8265. }
  8266. if iNdEx >= l {
  8267. return io.ErrUnexpectedEOF
  8268. }
  8269. b := dAtA[iNdEx]
  8270. iNdEx++
  8271. msglen |= int(b&0x7F) << shift
  8272. if b < 0x80 {
  8273. break
  8274. }
  8275. }
  8276. if msglen < 0 {
  8277. return ErrInvalidLengthTypes
  8278. }
  8279. postIndex := iNdEx + msglen
  8280. if postIndex < 0 {
  8281. return ErrInvalidLengthTypes
  8282. }
  8283. if postIndex > l {
  8284. return io.ErrUnexpectedEOF
  8285. }
  8286. m.Validators = append(m.Validators, ValidatorUpdate{})
  8287. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8288. return err
  8289. }
  8290. iNdEx = postIndex
  8291. case 5:
  8292. if wireType != 2 {
  8293. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  8294. }
  8295. var byteLen int
  8296. for shift := uint(0); ; shift += 7 {
  8297. if shift >= 64 {
  8298. return ErrIntOverflowTypes
  8299. }
  8300. if iNdEx >= l {
  8301. return io.ErrUnexpectedEOF
  8302. }
  8303. b := dAtA[iNdEx]
  8304. iNdEx++
  8305. byteLen |= int(b&0x7F) << shift
  8306. if b < 0x80 {
  8307. break
  8308. }
  8309. }
  8310. if byteLen < 0 {
  8311. return ErrInvalidLengthTypes
  8312. }
  8313. postIndex := iNdEx + byteLen
  8314. if postIndex < 0 {
  8315. return ErrInvalidLengthTypes
  8316. }
  8317. if postIndex > l {
  8318. return io.ErrUnexpectedEOF
  8319. }
  8320. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  8321. if m.AppStateBytes == nil {
  8322. m.AppStateBytes = []byte{}
  8323. }
  8324. iNdEx = postIndex
  8325. case 6:
  8326. if wireType != 0 {
  8327. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  8328. }
  8329. m.InitialHeight = 0
  8330. for shift := uint(0); ; shift += 7 {
  8331. if shift >= 64 {
  8332. return ErrIntOverflowTypes
  8333. }
  8334. if iNdEx >= l {
  8335. return io.ErrUnexpectedEOF
  8336. }
  8337. b := dAtA[iNdEx]
  8338. iNdEx++
  8339. m.InitialHeight |= int64(b&0x7F) << shift
  8340. if b < 0x80 {
  8341. break
  8342. }
  8343. }
  8344. default:
  8345. iNdEx = preIndex
  8346. skippy, err := skipTypes(dAtA[iNdEx:])
  8347. if err != nil {
  8348. return err
  8349. }
  8350. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8351. return ErrInvalidLengthTypes
  8352. }
  8353. if (iNdEx + skippy) > l {
  8354. return io.ErrUnexpectedEOF
  8355. }
  8356. iNdEx += skippy
  8357. }
  8358. }
  8359. if iNdEx > l {
  8360. return io.ErrUnexpectedEOF
  8361. }
  8362. return nil
  8363. }
  8364. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  8365. l := len(dAtA)
  8366. iNdEx := 0
  8367. for iNdEx < l {
  8368. preIndex := iNdEx
  8369. var wire uint64
  8370. for shift := uint(0); ; shift += 7 {
  8371. if shift >= 64 {
  8372. return ErrIntOverflowTypes
  8373. }
  8374. if iNdEx >= l {
  8375. return io.ErrUnexpectedEOF
  8376. }
  8377. b := dAtA[iNdEx]
  8378. iNdEx++
  8379. wire |= uint64(b&0x7F) << shift
  8380. if b < 0x80 {
  8381. break
  8382. }
  8383. }
  8384. fieldNum := int32(wire >> 3)
  8385. wireType := int(wire & 0x7)
  8386. if wireType == 4 {
  8387. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  8388. }
  8389. if fieldNum <= 0 {
  8390. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  8391. }
  8392. switch fieldNum {
  8393. case 1:
  8394. if wireType != 2 {
  8395. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  8396. }
  8397. var byteLen int
  8398. for shift := uint(0); ; shift += 7 {
  8399. if shift >= 64 {
  8400. return ErrIntOverflowTypes
  8401. }
  8402. if iNdEx >= l {
  8403. return io.ErrUnexpectedEOF
  8404. }
  8405. b := dAtA[iNdEx]
  8406. iNdEx++
  8407. byteLen |= int(b&0x7F) << shift
  8408. if b < 0x80 {
  8409. break
  8410. }
  8411. }
  8412. if byteLen < 0 {
  8413. return ErrInvalidLengthTypes
  8414. }
  8415. postIndex := iNdEx + byteLen
  8416. if postIndex < 0 {
  8417. return ErrInvalidLengthTypes
  8418. }
  8419. if postIndex > l {
  8420. return io.ErrUnexpectedEOF
  8421. }
  8422. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  8423. if m.Data == nil {
  8424. m.Data = []byte{}
  8425. }
  8426. iNdEx = postIndex
  8427. case 2:
  8428. if wireType != 2 {
  8429. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  8430. }
  8431. var stringLen uint64
  8432. for shift := uint(0); ; shift += 7 {
  8433. if shift >= 64 {
  8434. return ErrIntOverflowTypes
  8435. }
  8436. if iNdEx >= l {
  8437. return io.ErrUnexpectedEOF
  8438. }
  8439. b := dAtA[iNdEx]
  8440. iNdEx++
  8441. stringLen |= uint64(b&0x7F) << shift
  8442. if b < 0x80 {
  8443. break
  8444. }
  8445. }
  8446. intStringLen := int(stringLen)
  8447. if intStringLen < 0 {
  8448. return ErrInvalidLengthTypes
  8449. }
  8450. postIndex := iNdEx + intStringLen
  8451. if postIndex < 0 {
  8452. return ErrInvalidLengthTypes
  8453. }
  8454. if postIndex > l {
  8455. return io.ErrUnexpectedEOF
  8456. }
  8457. m.Path = string(dAtA[iNdEx:postIndex])
  8458. iNdEx = postIndex
  8459. case 3:
  8460. if wireType != 0 {
  8461. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8462. }
  8463. m.Height = 0
  8464. for shift := uint(0); ; shift += 7 {
  8465. if shift >= 64 {
  8466. return ErrIntOverflowTypes
  8467. }
  8468. if iNdEx >= l {
  8469. return io.ErrUnexpectedEOF
  8470. }
  8471. b := dAtA[iNdEx]
  8472. iNdEx++
  8473. m.Height |= int64(b&0x7F) << shift
  8474. if b < 0x80 {
  8475. break
  8476. }
  8477. }
  8478. case 4:
  8479. if wireType != 0 {
  8480. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  8481. }
  8482. var v int
  8483. for shift := uint(0); ; shift += 7 {
  8484. if shift >= 64 {
  8485. return ErrIntOverflowTypes
  8486. }
  8487. if iNdEx >= l {
  8488. return io.ErrUnexpectedEOF
  8489. }
  8490. b := dAtA[iNdEx]
  8491. iNdEx++
  8492. v |= int(b&0x7F) << shift
  8493. if b < 0x80 {
  8494. break
  8495. }
  8496. }
  8497. m.Prove = bool(v != 0)
  8498. default:
  8499. iNdEx = preIndex
  8500. skippy, err := skipTypes(dAtA[iNdEx:])
  8501. if err != nil {
  8502. return err
  8503. }
  8504. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8505. return ErrInvalidLengthTypes
  8506. }
  8507. if (iNdEx + skippy) > l {
  8508. return io.ErrUnexpectedEOF
  8509. }
  8510. iNdEx += skippy
  8511. }
  8512. }
  8513. if iNdEx > l {
  8514. return io.ErrUnexpectedEOF
  8515. }
  8516. return nil
  8517. }
  8518. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  8519. l := len(dAtA)
  8520. iNdEx := 0
  8521. for iNdEx < l {
  8522. preIndex := iNdEx
  8523. var wire uint64
  8524. for shift := uint(0); ; shift += 7 {
  8525. if shift >= 64 {
  8526. return ErrIntOverflowTypes
  8527. }
  8528. if iNdEx >= l {
  8529. return io.ErrUnexpectedEOF
  8530. }
  8531. b := dAtA[iNdEx]
  8532. iNdEx++
  8533. wire |= uint64(b&0x7F) << shift
  8534. if b < 0x80 {
  8535. break
  8536. }
  8537. }
  8538. fieldNum := int32(wire >> 3)
  8539. wireType := int(wire & 0x7)
  8540. if wireType == 4 {
  8541. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  8542. }
  8543. if fieldNum <= 0 {
  8544. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8545. }
  8546. switch fieldNum {
  8547. case 1:
  8548. if wireType != 2 {
  8549. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  8550. }
  8551. var byteLen int
  8552. for shift := uint(0); ; shift += 7 {
  8553. if shift >= 64 {
  8554. return ErrIntOverflowTypes
  8555. }
  8556. if iNdEx >= l {
  8557. return io.ErrUnexpectedEOF
  8558. }
  8559. b := dAtA[iNdEx]
  8560. iNdEx++
  8561. byteLen |= int(b&0x7F) << shift
  8562. if b < 0x80 {
  8563. break
  8564. }
  8565. }
  8566. if byteLen < 0 {
  8567. return ErrInvalidLengthTypes
  8568. }
  8569. postIndex := iNdEx + byteLen
  8570. if postIndex < 0 {
  8571. return ErrInvalidLengthTypes
  8572. }
  8573. if postIndex > l {
  8574. return io.ErrUnexpectedEOF
  8575. }
  8576. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  8577. if m.Hash == nil {
  8578. m.Hash = []byte{}
  8579. }
  8580. iNdEx = postIndex
  8581. case 2:
  8582. if wireType != 2 {
  8583. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8584. }
  8585. var msglen int
  8586. for shift := uint(0); ; shift += 7 {
  8587. if shift >= 64 {
  8588. return ErrIntOverflowTypes
  8589. }
  8590. if iNdEx >= l {
  8591. return io.ErrUnexpectedEOF
  8592. }
  8593. b := dAtA[iNdEx]
  8594. iNdEx++
  8595. msglen |= int(b&0x7F) << shift
  8596. if b < 0x80 {
  8597. break
  8598. }
  8599. }
  8600. if msglen < 0 {
  8601. return ErrInvalidLengthTypes
  8602. }
  8603. postIndex := iNdEx + msglen
  8604. if postIndex < 0 {
  8605. return ErrInvalidLengthTypes
  8606. }
  8607. if postIndex > l {
  8608. return io.ErrUnexpectedEOF
  8609. }
  8610. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8611. return err
  8612. }
  8613. iNdEx = postIndex
  8614. case 3:
  8615. if wireType != 2 {
  8616. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  8617. }
  8618. var msglen int
  8619. for shift := uint(0); ; shift += 7 {
  8620. if shift >= 64 {
  8621. return ErrIntOverflowTypes
  8622. }
  8623. if iNdEx >= l {
  8624. return io.ErrUnexpectedEOF
  8625. }
  8626. b := dAtA[iNdEx]
  8627. iNdEx++
  8628. msglen |= int(b&0x7F) << shift
  8629. if b < 0x80 {
  8630. break
  8631. }
  8632. }
  8633. if msglen < 0 {
  8634. return ErrInvalidLengthTypes
  8635. }
  8636. postIndex := iNdEx + msglen
  8637. if postIndex < 0 {
  8638. return ErrInvalidLengthTypes
  8639. }
  8640. if postIndex > l {
  8641. return io.ErrUnexpectedEOF
  8642. }
  8643. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8644. return err
  8645. }
  8646. iNdEx = postIndex
  8647. case 4:
  8648. if wireType != 2 {
  8649. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8650. }
  8651. var msglen int
  8652. for shift := uint(0); ; shift += 7 {
  8653. if shift >= 64 {
  8654. return ErrIntOverflowTypes
  8655. }
  8656. if iNdEx >= l {
  8657. return io.ErrUnexpectedEOF
  8658. }
  8659. b := dAtA[iNdEx]
  8660. iNdEx++
  8661. msglen |= int(b&0x7F) << shift
  8662. if b < 0x80 {
  8663. break
  8664. }
  8665. }
  8666. if msglen < 0 {
  8667. return ErrInvalidLengthTypes
  8668. }
  8669. postIndex := iNdEx + msglen
  8670. if postIndex < 0 {
  8671. return ErrInvalidLengthTypes
  8672. }
  8673. if postIndex > l {
  8674. return io.ErrUnexpectedEOF
  8675. }
  8676. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8677. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8678. return err
  8679. }
  8680. iNdEx = postIndex
  8681. default:
  8682. iNdEx = preIndex
  8683. skippy, err := skipTypes(dAtA[iNdEx:])
  8684. if err != nil {
  8685. return err
  8686. }
  8687. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8688. return ErrInvalidLengthTypes
  8689. }
  8690. if (iNdEx + skippy) > l {
  8691. return io.ErrUnexpectedEOF
  8692. }
  8693. iNdEx += skippy
  8694. }
  8695. }
  8696. if iNdEx > l {
  8697. return io.ErrUnexpectedEOF
  8698. }
  8699. return nil
  8700. }
  8701. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8702. l := len(dAtA)
  8703. iNdEx := 0
  8704. for iNdEx < l {
  8705. preIndex := iNdEx
  8706. var wire uint64
  8707. for shift := uint(0); ; shift += 7 {
  8708. if shift >= 64 {
  8709. return ErrIntOverflowTypes
  8710. }
  8711. if iNdEx >= l {
  8712. return io.ErrUnexpectedEOF
  8713. }
  8714. b := dAtA[iNdEx]
  8715. iNdEx++
  8716. wire |= uint64(b&0x7F) << shift
  8717. if b < 0x80 {
  8718. break
  8719. }
  8720. }
  8721. fieldNum := int32(wire >> 3)
  8722. wireType := int(wire & 0x7)
  8723. if wireType == 4 {
  8724. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8725. }
  8726. if fieldNum <= 0 {
  8727. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8728. }
  8729. switch fieldNum {
  8730. case 1:
  8731. if wireType != 2 {
  8732. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8733. }
  8734. var byteLen int
  8735. for shift := uint(0); ; shift += 7 {
  8736. if shift >= 64 {
  8737. return ErrIntOverflowTypes
  8738. }
  8739. if iNdEx >= l {
  8740. return io.ErrUnexpectedEOF
  8741. }
  8742. b := dAtA[iNdEx]
  8743. iNdEx++
  8744. byteLen |= int(b&0x7F) << shift
  8745. if b < 0x80 {
  8746. break
  8747. }
  8748. }
  8749. if byteLen < 0 {
  8750. return ErrInvalidLengthTypes
  8751. }
  8752. postIndex := iNdEx + byteLen
  8753. if postIndex < 0 {
  8754. return ErrInvalidLengthTypes
  8755. }
  8756. if postIndex > l {
  8757. return io.ErrUnexpectedEOF
  8758. }
  8759. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8760. if m.Tx == nil {
  8761. m.Tx = []byte{}
  8762. }
  8763. iNdEx = postIndex
  8764. case 2:
  8765. if wireType != 0 {
  8766. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8767. }
  8768. m.Type = 0
  8769. for shift := uint(0); ; shift += 7 {
  8770. if shift >= 64 {
  8771. return ErrIntOverflowTypes
  8772. }
  8773. if iNdEx >= l {
  8774. return io.ErrUnexpectedEOF
  8775. }
  8776. b := dAtA[iNdEx]
  8777. iNdEx++
  8778. m.Type |= CheckTxType(b&0x7F) << shift
  8779. if b < 0x80 {
  8780. break
  8781. }
  8782. }
  8783. default:
  8784. iNdEx = preIndex
  8785. skippy, err := skipTypes(dAtA[iNdEx:])
  8786. if err != nil {
  8787. return err
  8788. }
  8789. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8790. return ErrInvalidLengthTypes
  8791. }
  8792. if (iNdEx + skippy) > l {
  8793. return io.ErrUnexpectedEOF
  8794. }
  8795. iNdEx += skippy
  8796. }
  8797. }
  8798. if iNdEx > l {
  8799. return io.ErrUnexpectedEOF
  8800. }
  8801. return nil
  8802. }
  8803. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8804. l := len(dAtA)
  8805. iNdEx := 0
  8806. for iNdEx < l {
  8807. preIndex := iNdEx
  8808. var wire uint64
  8809. for shift := uint(0); ; shift += 7 {
  8810. if shift >= 64 {
  8811. return ErrIntOverflowTypes
  8812. }
  8813. if iNdEx >= l {
  8814. return io.ErrUnexpectedEOF
  8815. }
  8816. b := dAtA[iNdEx]
  8817. iNdEx++
  8818. wire |= uint64(b&0x7F) << shift
  8819. if b < 0x80 {
  8820. break
  8821. }
  8822. }
  8823. fieldNum := int32(wire >> 3)
  8824. wireType := int(wire & 0x7)
  8825. if wireType == 4 {
  8826. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8827. }
  8828. if fieldNum <= 0 {
  8829. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8830. }
  8831. switch fieldNum {
  8832. case 1:
  8833. if wireType != 2 {
  8834. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8835. }
  8836. var byteLen int
  8837. for shift := uint(0); ; shift += 7 {
  8838. if shift >= 64 {
  8839. return ErrIntOverflowTypes
  8840. }
  8841. if iNdEx >= l {
  8842. return io.ErrUnexpectedEOF
  8843. }
  8844. b := dAtA[iNdEx]
  8845. iNdEx++
  8846. byteLen |= int(b&0x7F) << shift
  8847. if b < 0x80 {
  8848. break
  8849. }
  8850. }
  8851. if byteLen < 0 {
  8852. return ErrInvalidLengthTypes
  8853. }
  8854. postIndex := iNdEx + byteLen
  8855. if postIndex < 0 {
  8856. return ErrInvalidLengthTypes
  8857. }
  8858. if postIndex > l {
  8859. return io.ErrUnexpectedEOF
  8860. }
  8861. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8862. if m.Tx == nil {
  8863. m.Tx = []byte{}
  8864. }
  8865. iNdEx = postIndex
  8866. default:
  8867. iNdEx = preIndex
  8868. skippy, err := skipTypes(dAtA[iNdEx:])
  8869. if err != nil {
  8870. return err
  8871. }
  8872. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8873. return ErrInvalidLengthTypes
  8874. }
  8875. if (iNdEx + skippy) > l {
  8876. return io.ErrUnexpectedEOF
  8877. }
  8878. iNdEx += skippy
  8879. }
  8880. }
  8881. if iNdEx > l {
  8882. return io.ErrUnexpectedEOF
  8883. }
  8884. return nil
  8885. }
  8886. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8887. l := len(dAtA)
  8888. iNdEx := 0
  8889. for iNdEx < l {
  8890. preIndex := iNdEx
  8891. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  8902. if b < 0x80 {
  8903. break
  8904. }
  8905. }
  8906. fieldNum := int32(wire >> 3)
  8907. wireType := int(wire & 0x7)
  8908. if wireType == 4 {
  8909. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8910. }
  8911. if fieldNum <= 0 {
  8912. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8913. }
  8914. switch fieldNum {
  8915. case 1:
  8916. if wireType != 0 {
  8917. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8918. }
  8919. m.Height = 0
  8920. for shift := uint(0); ; shift += 7 {
  8921. if shift >= 64 {
  8922. return ErrIntOverflowTypes
  8923. }
  8924. if iNdEx >= l {
  8925. return io.ErrUnexpectedEOF
  8926. }
  8927. b := dAtA[iNdEx]
  8928. iNdEx++
  8929. m.Height |= int64(b&0x7F) << shift
  8930. if b < 0x80 {
  8931. break
  8932. }
  8933. }
  8934. default:
  8935. iNdEx = preIndex
  8936. skippy, err := skipTypes(dAtA[iNdEx:])
  8937. if err != nil {
  8938. return err
  8939. }
  8940. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8941. return ErrInvalidLengthTypes
  8942. }
  8943. if (iNdEx + skippy) > l {
  8944. return io.ErrUnexpectedEOF
  8945. }
  8946. iNdEx += skippy
  8947. }
  8948. }
  8949. if iNdEx > l {
  8950. return io.ErrUnexpectedEOF
  8951. }
  8952. return nil
  8953. }
  8954. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8955. l := len(dAtA)
  8956. iNdEx := 0
  8957. for iNdEx < l {
  8958. preIndex := iNdEx
  8959. var wire uint64
  8960. for shift := uint(0); ; shift += 7 {
  8961. if shift >= 64 {
  8962. return ErrIntOverflowTypes
  8963. }
  8964. if iNdEx >= l {
  8965. return io.ErrUnexpectedEOF
  8966. }
  8967. b := dAtA[iNdEx]
  8968. iNdEx++
  8969. wire |= uint64(b&0x7F) << shift
  8970. if b < 0x80 {
  8971. break
  8972. }
  8973. }
  8974. fieldNum := int32(wire >> 3)
  8975. wireType := int(wire & 0x7)
  8976. if wireType == 4 {
  8977. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8978. }
  8979. if fieldNum <= 0 {
  8980. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8981. }
  8982. switch fieldNum {
  8983. default:
  8984. iNdEx = preIndex
  8985. skippy, err := skipTypes(dAtA[iNdEx:])
  8986. if err != nil {
  8987. return err
  8988. }
  8989. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8990. return ErrInvalidLengthTypes
  8991. }
  8992. if (iNdEx + skippy) > l {
  8993. return io.ErrUnexpectedEOF
  8994. }
  8995. iNdEx += skippy
  8996. }
  8997. }
  8998. if iNdEx > l {
  8999. return io.ErrUnexpectedEOF
  9000. }
  9001. return nil
  9002. }
  9003. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  9004. l := len(dAtA)
  9005. iNdEx := 0
  9006. for iNdEx < l {
  9007. preIndex := iNdEx
  9008. var wire uint64
  9009. for shift := uint(0); ; shift += 7 {
  9010. if shift >= 64 {
  9011. return ErrIntOverflowTypes
  9012. }
  9013. if iNdEx >= l {
  9014. return io.ErrUnexpectedEOF
  9015. }
  9016. b := dAtA[iNdEx]
  9017. iNdEx++
  9018. wire |= uint64(b&0x7F) << shift
  9019. if b < 0x80 {
  9020. break
  9021. }
  9022. }
  9023. fieldNum := int32(wire >> 3)
  9024. wireType := int(wire & 0x7)
  9025. if wireType == 4 {
  9026. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  9027. }
  9028. if fieldNum <= 0 {
  9029. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  9030. }
  9031. switch fieldNum {
  9032. default:
  9033. iNdEx = preIndex
  9034. skippy, err := skipTypes(dAtA[iNdEx:])
  9035. if err != nil {
  9036. return err
  9037. }
  9038. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9039. return ErrInvalidLengthTypes
  9040. }
  9041. if (iNdEx + skippy) > l {
  9042. return io.ErrUnexpectedEOF
  9043. }
  9044. iNdEx += skippy
  9045. }
  9046. }
  9047. if iNdEx > l {
  9048. return io.ErrUnexpectedEOF
  9049. }
  9050. return nil
  9051. }
  9052. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  9053. l := len(dAtA)
  9054. iNdEx := 0
  9055. for iNdEx < l {
  9056. preIndex := iNdEx
  9057. var wire uint64
  9058. for shift := uint(0); ; shift += 7 {
  9059. if shift >= 64 {
  9060. return ErrIntOverflowTypes
  9061. }
  9062. if iNdEx >= l {
  9063. return io.ErrUnexpectedEOF
  9064. }
  9065. b := dAtA[iNdEx]
  9066. iNdEx++
  9067. wire |= uint64(b&0x7F) << shift
  9068. if b < 0x80 {
  9069. break
  9070. }
  9071. }
  9072. fieldNum := int32(wire >> 3)
  9073. wireType := int(wire & 0x7)
  9074. if wireType == 4 {
  9075. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  9076. }
  9077. if fieldNum <= 0 {
  9078. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  9079. }
  9080. switch fieldNum {
  9081. case 1:
  9082. if wireType != 2 {
  9083. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  9084. }
  9085. var msglen int
  9086. for shift := uint(0); ; shift += 7 {
  9087. if shift >= 64 {
  9088. return ErrIntOverflowTypes
  9089. }
  9090. if iNdEx >= l {
  9091. return io.ErrUnexpectedEOF
  9092. }
  9093. b := dAtA[iNdEx]
  9094. iNdEx++
  9095. msglen |= int(b&0x7F) << shift
  9096. if b < 0x80 {
  9097. break
  9098. }
  9099. }
  9100. if msglen < 0 {
  9101. return ErrInvalidLengthTypes
  9102. }
  9103. postIndex := iNdEx + msglen
  9104. if postIndex < 0 {
  9105. return ErrInvalidLengthTypes
  9106. }
  9107. if postIndex > l {
  9108. return io.ErrUnexpectedEOF
  9109. }
  9110. if m.Snapshot == nil {
  9111. m.Snapshot = &Snapshot{}
  9112. }
  9113. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9114. return err
  9115. }
  9116. iNdEx = postIndex
  9117. case 2:
  9118. if wireType != 2 {
  9119. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  9120. }
  9121. var byteLen int
  9122. for shift := uint(0); ; shift += 7 {
  9123. if shift >= 64 {
  9124. return ErrIntOverflowTypes
  9125. }
  9126. if iNdEx >= l {
  9127. return io.ErrUnexpectedEOF
  9128. }
  9129. b := dAtA[iNdEx]
  9130. iNdEx++
  9131. byteLen |= int(b&0x7F) << shift
  9132. if b < 0x80 {
  9133. break
  9134. }
  9135. }
  9136. if byteLen < 0 {
  9137. return ErrInvalidLengthTypes
  9138. }
  9139. postIndex := iNdEx + byteLen
  9140. if postIndex < 0 {
  9141. return ErrInvalidLengthTypes
  9142. }
  9143. if postIndex > l {
  9144. return io.ErrUnexpectedEOF
  9145. }
  9146. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  9147. if m.AppHash == nil {
  9148. m.AppHash = []byte{}
  9149. }
  9150. iNdEx = postIndex
  9151. default:
  9152. iNdEx = preIndex
  9153. skippy, err := skipTypes(dAtA[iNdEx:])
  9154. if err != nil {
  9155. return err
  9156. }
  9157. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9158. return ErrInvalidLengthTypes
  9159. }
  9160. if (iNdEx + skippy) > l {
  9161. return io.ErrUnexpectedEOF
  9162. }
  9163. iNdEx += skippy
  9164. }
  9165. }
  9166. if iNdEx > l {
  9167. return io.ErrUnexpectedEOF
  9168. }
  9169. return nil
  9170. }
  9171. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  9172. l := len(dAtA)
  9173. iNdEx := 0
  9174. for iNdEx < l {
  9175. preIndex := iNdEx
  9176. var wire uint64
  9177. for shift := uint(0); ; shift += 7 {
  9178. if shift >= 64 {
  9179. return ErrIntOverflowTypes
  9180. }
  9181. if iNdEx >= l {
  9182. return io.ErrUnexpectedEOF
  9183. }
  9184. b := dAtA[iNdEx]
  9185. iNdEx++
  9186. wire |= uint64(b&0x7F) << shift
  9187. if b < 0x80 {
  9188. break
  9189. }
  9190. }
  9191. fieldNum := int32(wire >> 3)
  9192. wireType := int(wire & 0x7)
  9193. if wireType == 4 {
  9194. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  9195. }
  9196. if fieldNum <= 0 {
  9197. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  9198. }
  9199. switch fieldNum {
  9200. case 1:
  9201. if wireType != 0 {
  9202. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  9203. }
  9204. m.Height = 0
  9205. for shift := uint(0); ; shift += 7 {
  9206. if shift >= 64 {
  9207. return ErrIntOverflowTypes
  9208. }
  9209. if iNdEx >= l {
  9210. return io.ErrUnexpectedEOF
  9211. }
  9212. b := dAtA[iNdEx]
  9213. iNdEx++
  9214. m.Height |= uint64(b&0x7F) << shift
  9215. if b < 0x80 {
  9216. break
  9217. }
  9218. }
  9219. case 2:
  9220. if wireType != 0 {
  9221. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  9222. }
  9223. m.Format = 0
  9224. for shift := uint(0); ; shift += 7 {
  9225. if shift >= 64 {
  9226. return ErrIntOverflowTypes
  9227. }
  9228. if iNdEx >= l {
  9229. return io.ErrUnexpectedEOF
  9230. }
  9231. b := dAtA[iNdEx]
  9232. iNdEx++
  9233. m.Format |= uint32(b&0x7F) << shift
  9234. if b < 0x80 {
  9235. break
  9236. }
  9237. }
  9238. case 3:
  9239. if wireType != 0 {
  9240. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  9241. }
  9242. m.Chunk = 0
  9243. for shift := uint(0); ; shift += 7 {
  9244. if shift >= 64 {
  9245. return ErrIntOverflowTypes
  9246. }
  9247. if iNdEx >= l {
  9248. return io.ErrUnexpectedEOF
  9249. }
  9250. b := dAtA[iNdEx]
  9251. iNdEx++
  9252. m.Chunk |= uint32(b&0x7F) << shift
  9253. if b < 0x80 {
  9254. break
  9255. }
  9256. }
  9257. default:
  9258. iNdEx = preIndex
  9259. skippy, err := skipTypes(dAtA[iNdEx:])
  9260. if err != nil {
  9261. return err
  9262. }
  9263. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9264. return ErrInvalidLengthTypes
  9265. }
  9266. if (iNdEx + skippy) > l {
  9267. return io.ErrUnexpectedEOF
  9268. }
  9269. iNdEx += skippy
  9270. }
  9271. }
  9272. if iNdEx > l {
  9273. return io.ErrUnexpectedEOF
  9274. }
  9275. return nil
  9276. }
  9277. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  9278. l := len(dAtA)
  9279. iNdEx := 0
  9280. for iNdEx < l {
  9281. preIndex := iNdEx
  9282. var wire uint64
  9283. for shift := uint(0); ; shift += 7 {
  9284. if shift >= 64 {
  9285. return ErrIntOverflowTypes
  9286. }
  9287. if iNdEx >= l {
  9288. return io.ErrUnexpectedEOF
  9289. }
  9290. b := dAtA[iNdEx]
  9291. iNdEx++
  9292. wire |= uint64(b&0x7F) << shift
  9293. if b < 0x80 {
  9294. break
  9295. }
  9296. }
  9297. fieldNum := int32(wire >> 3)
  9298. wireType := int(wire & 0x7)
  9299. if wireType == 4 {
  9300. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  9301. }
  9302. if fieldNum <= 0 {
  9303. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  9304. }
  9305. switch fieldNum {
  9306. case 1:
  9307. if wireType != 0 {
  9308. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  9309. }
  9310. m.Index = 0
  9311. for shift := uint(0); ; shift += 7 {
  9312. if shift >= 64 {
  9313. return ErrIntOverflowTypes
  9314. }
  9315. if iNdEx >= l {
  9316. return io.ErrUnexpectedEOF
  9317. }
  9318. b := dAtA[iNdEx]
  9319. iNdEx++
  9320. m.Index |= uint32(b&0x7F) << shift
  9321. if b < 0x80 {
  9322. break
  9323. }
  9324. }
  9325. case 2:
  9326. if wireType != 2 {
  9327. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  9328. }
  9329. var byteLen int
  9330. for shift := uint(0); ; shift += 7 {
  9331. if shift >= 64 {
  9332. return ErrIntOverflowTypes
  9333. }
  9334. if iNdEx >= l {
  9335. return io.ErrUnexpectedEOF
  9336. }
  9337. b := dAtA[iNdEx]
  9338. iNdEx++
  9339. byteLen |= int(b&0x7F) << shift
  9340. if b < 0x80 {
  9341. break
  9342. }
  9343. }
  9344. if byteLen < 0 {
  9345. return ErrInvalidLengthTypes
  9346. }
  9347. postIndex := iNdEx + byteLen
  9348. if postIndex < 0 {
  9349. return ErrInvalidLengthTypes
  9350. }
  9351. if postIndex > l {
  9352. return io.ErrUnexpectedEOF
  9353. }
  9354. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  9355. if m.Chunk == nil {
  9356. m.Chunk = []byte{}
  9357. }
  9358. iNdEx = postIndex
  9359. case 3:
  9360. if wireType != 2 {
  9361. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  9362. }
  9363. var stringLen uint64
  9364. for shift := uint(0); ; shift += 7 {
  9365. if shift >= 64 {
  9366. return ErrIntOverflowTypes
  9367. }
  9368. if iNdEx >= l {
  9369. return io.ErrUnexpectedEOF
  9370. }
  9371. b := dAtA[iNdEx]
  9372. iNdEx++
  9373. stringLen |= uint64(b&0x7F) << shift
  9374. if b < 0x80 {
  9375. break
  9376. }
  9377. }
  9378. intStringLen := int(stringLen)
  9379. if intStringLen < 0 {
  9380. return ErrInvalidLengthTypes
  9381. }
  9382. postIndex := iNdEx + intStringLen
  9383. if postIndex < 0 {
  9384. return ErrInvalidLengthTypes
  9385. }
  9386. if postIndex > l {
  9387. return io.ErrUnexpectedEOF
  9388. }
  9389. m.Sender = string(dAtA[iNdEx:postIndex])
  9390. iNdEx = postIndex
  9391. default:
  9392. iNdEx = preIndex
  9393. skippy, err := skipTypes(dAtA[iNdEx:])
  9394. if err != nil {
  9395. return err
  9396. }
  9397. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9398. return ErrInvalidLengthTypes
  9399. }
  9400. if (iNdEx + skippy) > l {
  9401. return io.ErrUnexpectedEOF
  9402. }
  9403. iNdEx += skippy
  9404. }
  9405. }
  9406. if iNdEx > l {
  9407. return io.ErrUnexpectedEOF
  9408. }
  9409. return nil
  9410. }
  9411. func (m *Response) Unmarshal(dAtA []byte) error {
  9412. l := len(dAtA)
  9413. iNdEx := 0
  9414. for iNdEx < l {
  9415. preIndex := iNdEx
  9416. var wire uint64
  9417. for shift := uint(0); ; shift += 7 {
  9418. if shift >= 64 {
  9419. return ErrIntOverflowTypes
  9420. }
  9421. if iNdEx >= l {
  9422. return io.ErrUnexpectedEOF
  9423. }
  9424. b := dAtA[iNdEx]
  9425. iNdEx++
  9426. wire |= uint64(b&0x7F) << shift
  9427. if b < 0x80 {
  9428. break
  9429. }
  9430. }
  9431. fieldNum := int32(wire >> 3)
  9432. wireType := int(wire & 0x7)
  9433. if wireType == 4 {
  9434. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  9435. }
  9436. if fieldNum <= 0 {
  9437. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  9438. }
  9439. switch fieldNum {
  9440. case 1:
  9441. if wireType != 2 {
  9442. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  9443. }
  9444. var msglen int
  9445. for shift := uint(0); ; shift += 7 {
  9446. if shift >= 64 {
  9447. return ErrIntOverflowTypes
  9448. }
  9449. if iNdEx >= l {
  9450. return io.ErrUnexpectedEOF
  9451. }
  9452. b := dAtA[iNdEx]
  9453. iNdEx++
  9454. msglen |= int(b&0x7F) << shift
  9455. if b < 0x80 {
  9456. break
  9457. }
  9458. }
  9459. if msglen < 0 {
  9460. return ErrInvalidLengthTypes
  9461. }
  9462. postIndex := iNdEx + msglen
  9463. if postIndex < 0 {
  9464. return ErrInvalidLengthTypes
  9465. }
  9466. if postIndex > l {
  9467. return io.ErrUnexpectedEOF
  9468. }
  9469. v := &ResponseException{}
  9470. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9471. return err
  9472. }
  9473. m.Value = &Response_Exception{v}
  9474. iNdEx = postIndex
  9475. case 2:
  9476. if wireType != 2 {
  9477. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  9478. }
  9479. var msglen int
  9480. for shift := uint(0); ; shift += 7 {
  9481. if shift >= 64 {
  9482. return ErrIntOverflowTypes
  9483. }
  9484. if iNdEx >= l {
  9485. return io.ErrUnexpectedEOF
  9486. }
  9487. b := dAtA[iNdEx]
  9488. iNdEx++
  9489. msglen |= int(b&0x7F) << shift
  9490. if b < 0x80 {
  9491. break
  9492. }
  9493. }
  9494. if msglen < 0 {
  9495. return ErrInvalidLengthTypes
  9496. }
  9497. postIndex := iNdEx + msglen
  9498. if postIndex < 0 {
  9499. return ErrInvalidLengthTypes
  9500. }
  9501. if postIndex > l {
  9502. return io.ErrUnexpectedEOF
  9503. }
  9504. v := &ResponseEcho{}
  9505. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9506. return err
  9507. }
  9508. m.Value = &Response_Echo{v}
  9509. iNdEx = postIndex
  9510. case 3:
  9511. if wireType != 2 {
  9512. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  9513. }
  9514. var msglen int
  9515. for shift := uint(0); ; shift += 7 {
  9516. if shift >= 64 {
  9517. return ErrIntOverflowTypes
  9518. }
  9519. if iNdEx >= l {
  9520. return io.ErrUnexpectedEOF
  9521. }
  9522. b := dAtA[iNdEx]
  9523. iNdEx++
  9524. msglen |= int(b&0x7F) << shift
  9525. if b < 0x80 {
  9526. break
  9527. }
  9528. }
  9529. if msglen < 0 {
  9530. return ErrInvalidLengthTypes
  9531. }
  9532. postIndex := iNdEx + msglen
  9533. if postIndex < 0 {
  9534. return ErrInvalidLengthTypes
  9535. }
  9536. if postIndex > l {
  9537. return io.ErrUnexpectedEOF
  9538. }
  9539. v := &ResponseFlush{}
  9540. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9541. return err
  9542. }
  9543. m.Value = &Response_Flush{v}
  9544. iNdEx = postIndex
  9545. case 4:
  9546. if wireType != 2 {
  9547. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9548. }
  9549. var msglen int
  9550. for shift := uint(0); ; shift += 7 {
  9551. if shift >= 64 {
  9552. return ErrIntOverflowTypes
  9553. }
  9554. if iNdEx >= l {
  9555. return io.ErrUnexpectedEOF
  9556. }
  9557. b := dAtA[iNdEx]
  9558. iNdEx++
  9559. msglen |= int(b&0x7F) << shift
  9560. if b < 0x80 {
  9561. break
  9562. }
  9563. }
  9564. if msglen < 0 {
  9565. return ErrInvalidLengthTypes
  9566. }
  9567. postIndex := iNdEx + msglen
  9568. if postIndex < 0 {
  9569. return ErrInvalidLengthTypes
  9570. }
  9571. if postIndex > l {
  9572. return io.ErrUnexpectedEOF
  9573. }
  9574. v := &ResponseInfo{}
  9575. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9576. return err
  9577. }
  9578. m.Value = &Response_Info{v}
  9579. iNdEx = postIndex
  9580. case 5:
  9581. if wireType != 2 {
  9582. return fmt.Errorf("proto: wrong wireType = %d for field SetOption", wireType)
  9583. }
  9584. var msglen int
  9585. for shift := uint(0); ; shift += 7 {
  9586. if shift >= 64 {
  9587. return ErrIntOverflowTypes
  9588. }
  9589. if iNdEx >= l {
  9590. return io.ErrUnexpectedEOF
  9591. }
  9592. b := dAtA[iNdEx]
  9593. iNdEx++
  9594. msglen |= int(b&0x7F) << shift
  9595. if b < 0x80 {
  9596. break
  9597. }
  9598. }
  9599. if msglen < 0 {
  9600. return ErrInvalidLengthTypes
  9601. }
  9602. postIndex := iNdEx + msglen
  9603. if postIndex < 0 {
  9604. return ErrInvalidLengthTypes
  9605. }
  9606. if postIndex > l {
  9607. return io.ErrUnexpectedEOF
  9608. }
  9609. v := &ResponseSetOption{}
  9610. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9611. return err
  9612. }
  9613. m.Value = &Response_SetOption{v}
  9614. iNdEx = postIndex
  9615. case 6:
  9616. if wireType != 2 {
  9617. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  9618. }
  9619. var msglen int
  9620. for shift := uint(0); ; shift += 7 {
  9621. if shift >= 64 {
  9622. return ErrIntOverflowTypes
  9623. }
  9624. if iNdEx >= l {
  9625. return io.ErrUnexpectedEOF
  9626. }
  9627. b := dAtA[iNdEx]
  9628. iNdEx++
  9629. msglen |= int(b&0x7F) << shift
  9630. if b < 0x80 {
  9631. break
  9632. }
  9633. }
  9634. if msglen < 0 {
  9635. return ErrInvalidLengthTypes
  9636. }
  9637. postIndex := iNdEx + msglen
  9638. if postIndex < 0 {
  9639. return ErrInvalidLengthTypes
  9640. }
  9641. if postIndex > l {
  9642. return io.ErrUnexpectedEOF
  9643. }
  9644. v := &ResponseInitChain{}
  9645. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9646. return err
  9647. }
  9648. m.Value = &Response_InitChain{v}
  9649. iNdEx = postIndex
  9650. case 7:
  9651. if wireType != 2 {
  9652. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  9653. }
  9654. var msglen int
  9655. for shift := uint(0); ; shift += 7 {
  9656. if shift >= 64 {
  9657. return ErrIntOverflowTypes
  9658. }
  9659. if iNdEx >= l {
  9660. return io.ErrUnexpectedEOF
  9661. }
  9662. b := dAtA[iNdEx]
  9663. iNdEx++
  9664. msglen |= int(b&0x7F) << shift
  9665. if b < 0x80 {
  9666. break
  9667. }
  9668. }
  9669. if msglen < 0 {
  9670. return ErrInvalidLengthTypes
  9671. }
  9672. postIndex := iNdEx + msglen
  9673. if postIndex < 0 {
  9674. return ErrInvalidLengthTypes
  9675. }
  9676. if postIndex > l {
  9677. return io.ErrUnexpectedEOF
  9678. }
  9679. v := &ResponseQuery{}
  9680. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9681. return err
  9682. }
  9683. m.Value = &Response_Query{v}
  9684. iNdEx = postIndex
  9685. case 8:
  9686. if wireType != 2 {
  9687. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9688. }
  9689. var msglen int
  9690. for shift := uint(0); ; shift += 7 {
  9691. if shift >= 64 {
  9692. return ErrIntOverflowTypes
  9693. }
  9694. if iNdEx >= l {
  9695. return io.ErrUnexpectedEOF
  9696. }
  9697. b := dAtA[iNdEx]
  9698. iNdEx++
  9699. msglen |= int(b&0x7F) << shift
  9700. if b < 0x80 {
  9701. break
  9702. }
  9703. }
  9704. if msglen < 0 {
  9705. return ErrInvalidLengthTypes
  9706. }
  9707. postIndex := iNdEx + msglen
  9708. if postIndex < 0 {
  9709. return ErrInvalidLengthTypes
  9710. }
  9711. if postIndex > l {
  9712. return io.ErrUnexpectedEOF
  9713. }
  9714. v := &ResponseBeginBlock{}
  9715. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9716. return err
  9717. }
  9718. m.Value = &Response_BeginBlock{v}
  9719. iNdEx = postIndex
  9720. case 9:
  9721. if wireType != 2 {
  9722. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9723. }
  9724. var msglen int
  9725. for shift := uint(0); ; shift += 7 {
  9726. if shift >= 64 {
  9727. return ErrIntOverflowTypes
  9728. }
  9729. if iNdEx >= l {
  9730. return io.ErrUnexpectedEOF
  9731. }
  9732. b := dAtA[iNdEx]
  9733. iNdEx++
  9734. msglen |= int(b&0x7F) << shift
  9735. if b < 0x80 {
  9736. break
  9737. }
  9738. }
  9739. if msglen < 0 {
  9740. return ErrInvalidLengthTypes
  9741. }
  9742. postIndex := iNdEx + msglen
  9743. if postIndex < 0 {
  9744. return ErrInvalidLengthTypes
  9745. }
  9746. if postIndex > l {
  9747. return io.ErrUnexpectedEOF
  9748. }
  9749. v := &ResponseCheckTx{}
  9750. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9751. return err
  9752. }
  9753. m.Value = &Response_CheckTx{v}
  9754. iNdEx = postIndex
  9755. case 10:
  9756. if wireType != 2 {
  9757. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9758. }
  9759. var msglen int
  9760. for shift := uint(0); ; shift += 7 {
  9761. if shift >= 64 {
  9762. return ErrIntOverflowTypes
  9763. }
  9764. if iNdEx >= l {
  9765. return io.ErrUnexpectedEOF
  9766. }
  9767. b := dAtA[iNdEx]
  9768. iNdEx++
  9769. msglen |= int(b&0x7F) << shift
  9770. if b < 0x80 {
  9771. break
  9772. }
  9773. }
  9774. if msglen < 0 {
  9775. return ErrInvalidLengthTypes
  9776. }
  9777. postIndex := iNdEx + msglen
  9778. if postIndex < 0 {
  9779. return ErrInvalidLengthTypes
  9780. }
  9781. if postIndex > l {
  9782. return io.ErrUnexpectedEOF
  9783. }
  9784. v := &ResponseDeliverTx{}
  9785. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9786. return err
  9787. }
  9788. m.Value = &Response_DeliverTx{v}
  9789. iNdEx = postIndex
  9790. case 11:
  9791. if wireType != 2 {
  9792. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9793. }
  9794. var msglen int
  9795. for shift := uint(0); ; shift += 7 {
  9796. if shift >= 64 {
  9797. return ErrIntOverflowTypes
  9798. }
  9799. if iNdEx >= l {
  9800. return io.ErrUnexpectedEOF
  9801. }
  9802. b := dAtA[iNdEx]
  9803. iNdEx++
  9804. msglen |= int(b&0x7F) << shift
  9805. if b < 0x80 {
  9806. break
  9807. }
  9808. }
  9809. if msglen < 0 {
  9810. return ErrInvalidLengthTypes
  9811. }
  9812. postIndex := iNdEx + msglen
  9813. if postIndex < 0 {
  9814. return ErrInvalidLengthTypes
  9815. }
  9816. if postIndex > l {
  9817. return io.ErrUnexpectedEOF
  9818. }
  9819. v := &ResponseEndBlock{}
  9820. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9821. return err
  9822. }
  9823. m.Value = &Response_EndBlock{v}
  9824. iNdEx = postIndex
  9825. case 12:
  9826. if wireType != 2 {
  9827. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9828. }
  9829. var msglen int
  9830. for shift := uint(0); ; shift += 7 {
  9831. if shift >= 64 {
  9832. return ErrIntOverflowTypes
  9833. }
  9834. if iNdEx >= l {
  9835. return io.ErrUnexpectedEOF
  9836. }
  9837. b := dAtA[iNdEx]
  9838. iNdEx++
  9839. msglen |= int(b&0x7F) << shift
  9840. if b < 0x80 {
  9841. break
  9842. }
  9843. }
  9844. if msglen < 0 {
  9845. return ErrInvalidLengthTypes
  9846. }
  9847. postIndex := iNdEx + msglen
  9848. if postIndex < 0 {
  9849. return ErrInvalidLengthTypes
  9850. }
  9851. if postIndex > l {
  9852. return io.ErrUnexpectedEOF
  9853. }
  9854. v := &ResponseCommit{}
  9855. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9856. return err
  9857. }
  9858. m.Value = &Response_Commit{v}
  9859. iNdEx = postIndex
  9860. case 13:
  9861. if wireType != 2 {
  9862. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9863. }
  9864. var msglen int
  9865. for shift := uint(0); ; shift += 7 {
  9866. if shift >= 64 {
  9867. return ErrIntOverflowTypes
  9868. }
  9869. if iNdEx >= l {
  9870. return io.ErrUnexpectedEOF
  9871. }
  9872. b := dAtA[iNdEx]
  9873. iNdEx++
  9874. msglen |= int(b&0x7F) << shift
  9875. if b < 0x80 {
  9876. break
  9877. }
  9878. }
  9879. if msglen < 0 {
  9880. return ErrInvalidLengthTypes
  9881. }
  9882. postIndex := iNdEx + msglen
  9883. if postIndex < 0 {
  9884. return ErrInvalidLengthTypes
  9885. }
  9886. if postIndex > l {
  9887. return io.ErrUnexpectedEOF
  9888. }
  9889. v := &ResponseListSnapshots{}
  9890. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9891. return err
  9892. }
  9893. m.Value = &Response_ListSnapshots{v}
  9894. iNdEx = postIndex
  9895. case 14:
  9896. if wireType != 2 {
  9897. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9898. }
  9899. var msglen int
  9900. for shift := uint(0); ; shift += 7 {
  9901. if shift >= 64 {
  9902. return ErrIntOverflowTypes
  9903. }
  9904. if iNdEx >= l {
  9905. return io.ErrUnexpectedEOF
  9906. }
  9907. b := dAtA[iNdEx]
  9908. iNdEx++
  9909. msglen |= int(b&0x7F) << shift
  9910. if b < 0x80 {
  9911. break
  9912. }
  9913. }
  9914. if msglen < 0 {
  9915. return ErrInvalidLengthTypes
  9916. }
  9917. postIndex := iNdEx + msglen
  9918. if postIndex < 0 {
  9919. return ErrInvalidLengthTypes
  9920. }
  9921. if postIndex > l {
  9922. return io.ErrUnexpectedEOF
  9923. }
  9924. v := &ResponseOfferSnapshot{}
  9925. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9926. return err
  9927. }
  9928. m.Value = &Response_OfferSnapshot{v}
  9929. iNdEx = postIndex
  9930. case 15:
  9931. if wireType != 2 {
  9932. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9933. }
  9934. var msglen int
  9935. for shift := uint(0); ; shift += 7 {
  9936. if shift >= 64 {
  9937. return ErrIntOverflowTypes
  9938. }
  9939. if iNdEx >= l {
  9940. return io.ErrUnexpectedEOF
  9941. }
  9942. b := dAtA[iNdEx]
  9943. iNdEx++
  9944. msglen |= int(b&0x7F) << shift
  9945. if b < 0x80 {
  9946. break
  9947. }
  9948. }
  9949. if msglen < 0 {
  9950. return ErrInvalidLengthTypes
  9951. }
  9952. postIndex := iNdEx + msglen
  9953. if postIndex < 0 {
  9954. return ErrInvalidLengthTypes
  9955. }
  9956. if postIndex > l {
  9957. return io.ErrUnexpectedEOF
  9958. }
  9959. v := &ResponseLoadSnapshotChunk{}
  9960. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9961. return err
  9962. }
  9963. m.Value = &Response_LoadSnapshotChunk{v}
  9964. iNdEx = postIndex
  9965. case 16:
  9966. if wireType != 2 {
  9967. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9968. }
  9969. var msglen int
  9970. for shift := uint(0); ; shift += 7 {
  9971. if shift >= 64 {
  9972. return ErrIntOverflowTypes
  9973. }
  9974. if iNdEx >= l {
  9975. return io.ErrUnexpectedEOF
  9976. }
  9977. b := dAtA[iNdEx]
  9978. iNdEx++
  9979. msglen |= int(b&0x7F) << shift
  9980. if b < 0x80 {
  9981. break
  9982. }
  9983. }
  9984. if msglen < 0 {
  9985. return ErrInvalidLengthTypes
  9986. }
  9987. postIndex := iNdEx + msglen
  9988. if postIndex < 0 {
  9989. return ErrInvalidLengthTypes
  9990. }
  9991. if postIndex > l {
  9992. return io.ErrUnexpectedEOF
  9993. }
  9994. v := &ResponseApplySnapshotChunk{}
  9995. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9996. return err
  9997. }
  9998. m.Value = &Response_ApplySnapshotChunk{v}
  9999. iNdEx = postIndex
  10000. default:
  10001. iNdEx = preIndex
  10002. skippy, err := skipTypes(dAtA[iNdEx:])
  10003. if err != nil {
  10004. return err
  10005. }
  10006. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10007. return ErrInvalidLengthTypes
  10008. }
  10009. if (iNdEx + skippy) > l {
  10010. return io.ErrUnexpectedEOF
  10011. }
  10012. iNdEx += skippy
  10013. }
  10014. }
  10015. if iNdEx > l {
  10016. return io.ErrUnexpectedEOF
  10017. }
  10018. return nil
  10019. }
  10020. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  10021. l := len(dAtA)
  10022. iNdEx := 0
  10023. for iNdEx < l {
  10024. preIndex := iNdEx
  10025. var wire uint64
  10026. for shift := uint(0); ; shift += 7 {
  10027. if shift >= 64 {
  10028. return ErrIntOverflowTypes
  10029. }
  10030. if iNdEx >= l {
  10031. return io.ErrUnexpectedEOF
  10032. }
  10033. b := dAtA[iNdEx]
  10034. iNdEx++
  10035. wire |= uint64(b&0x7F) << shift
  10036. if b < 0x80 {
  10037. break
  10038. }
  10039. }
  10040. fieldNum := int32(wire >> 3)
  10041. wireType := int(wire & 0x7)
  10042. if wireType == 4 {
  10043. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  10044. }
  10045. if fieldNum <= 0 {
  10046. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  10047. }
  10048. switch fieldNum {
  10049. case 1:
  10050. if wireType != 2 {
  10051. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  10052. }
  10053. var stringLen uint64
  10054. for shift := uint(0); ; shift += 7 {
  10055. if shift >= 64 {
  10056. return ErrIntOverflowTypes
  10057. }
  10058. if iNdEx >= l {
  10059. return io.ErrUnexpectedEOF
  10060. }
  10061. b := dAtA[iNdEx]
  10062. iNdEx++
  10063. stringLen |= uint64(b&0x7F) << shift
  10064. if b < 0x80 {
  10065. break
  10066. }
  10067. }
  10068. intStringLen := int(stringLen)
  10069. if intStringLen < 0 {
  10070. return ErrInvalidLengthTypes
  10071. }
  10072. postIndex := iNdEx + intStringLen
  10073. if postIndex < 0 {
  10074. return ErrInvalidLengthTypes
  10075. }
  10076. if postIndex > l {
  10077. return io.ErrUnexpectedEOF
  10078. }
  10079. m.Error = string(dAtA[iNdEx:postIndex])
  10080. iNdEx = postIndex
  10081. default:
  10082. iNdEx = preIndex
  10083. skippy, err := skipTypes(dAtA[iNdEx:])
  10084. if err != nil {
  10085. return err
  10086. }
  10087. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10088. return ErrInvalidLengthTypes
  10089. }
  10090. if (iNdEx + skippy) > l {
  10091. return io.ErrUnexpectedEOF
  10092. }
  10093. iNdEx += skippy
  10094. }
  10095. }
  10096. if iNdEx > l {
  10097. return io.ErrUnexpectedEOF
  10098. }
  10099. return nil
  10100. }
  10101. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  10102. l := len(dAtA)
  10103. iNdEx := 0
  10104. for iNdEx < l {
  10105. preIndex := iNdEx
  10106. var wire uint64
  10107. for shift := uint(0); ; shift += 7 {
  10108. if shift >= 64 {
  10109. return ErrIntOverflowTypes
  10110. }
  10111. if iNdEx >= l {
  10112. return io.ErrUnexpectedEOF
  10113. }
  10114. b := dAtA[iNdEx]
  10115. iNdEx++
  10116. wire |= uint64(b&0x7F) << shift
  10117. if b < 0x80 {
  10118. break
  10119. }
  10120. }
  10121. fieldNum := int32(wire >> 3)
  10122. wireType := int(wire & 0x7)
  10123. if wireType == 4 {
  10124. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  10125. }
  10126. if fieldNum <= 0 {
  10127. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  10128. }
  10129. switch fieldNum {
  10130. case 1:
  10131. if wireType != 2 {
  10132. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  10133. }
  10134. var stringLen uint64
  10135. for shift := uint(0); ; shift += 7 {
  10136. if shift >= 64 {
  10137. return ErrIntOverflowTypes
  10138. }
  10139. if iNdEx >= l {
  10140. return io.ErrUnexpectedEOF
  10141. }
  10142. b := dAtA[iNdEx]
  10143. iNdEx++
  10144. stringLen |= uint64(b&0x7F) << shift
  10145. if b < 0x80 {
  10146. break
  10147. }
  10148. }
  10149. intStringLen := int(stringLen)
  10150. if intStringLen < 0 {
  10151. return ErrInvalidLengthTypes
  10152. }
  10153. postIndex := iNdEx + intStringLen
  10154. if postIndex < 0 {
  10155. return ErrInvalidLengthTypes
  10156. }
  10157. if postIndex > l {
  10158. return io.ErrUnexpectedEOF
  10159. }
  10160. m.Message = string(dAtA[iNdEx:postIndex])
  10161. iNdEx = postIndex
  10162. default:
  10163. iNdEx = preIndex
  10164. skippy, err := skipTypes(dAtA[iNdEx:])
  10165. if err != nil {
  10166. return err
  10167. }
  10168. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10169. return ErrInvalidLengthTypes
  10170. }
  10171. if (iNdEx + skippy) > l {
  10172. return io.ErrUnexpectedEOF
  10173. }
  10174. iNdEx += skippy
  10175. }
  10176. }
  10177. if iNdEx > l {
  10178. return io.ErrUnexpectedEOF
  10179. }
  10180. return nil
  10181. }
  10182. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  10183. l := len(dAtA)
  10184. iNdEx := 0
  10185. for iNdEx < l {
  10186. preIndex := iNdEx
  10187. var wire uint64
  10188. for shift := uint(0); ; shift += 7 {
  10189. if shift >= 64 {
  10190. return ErrIntOverflowTypes
  10191. }
  10192. if iNdEx >= l {
  10193. return io.ErrUnexpectedEOF
  10194. }
  10195. b := dAtA[iNdEx]
  10196. iNdEx++
  10197. wire |= uint64(b&0x7F) << shift
  10198. if b < 0x80 {
  10199. break
  10200. }
  10201. }
  10202. fieldNum := int32(wire >> 3)
  10203. wireType := int(wire & 0x7)
  10204. if wireType == 4 {
  10205. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  10206. }
  10207. if fieldNum <= 0 {
  10208. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  10209. }
  10210. switch fieldNum {
  10211. default:
  10212. iNdEx = preIndex
  10213. skippy, err := skipTypes(dAtA[iNdEx:])
  10214. if err != nil {
  10215. return err
  10216. }
  10217. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10218. return ErrInvalidLengthTypes
  10219. }
  10220. if (iNdEx + skippy) > l {
  10221. return io.ErrUnexpectedEOF
  10222. }
  10223. iNdEx += skippy
  10224. }
  10225. }
  10226. if iNdEx > l {
  10227. return io.ErrUnexpectedEOF
  10228. }
  10229. return nil
  10230. }
  10231. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  10232. l := len(dAtA)
  10233. iNdEx := 0
  10234. for iNdEx < l {
  10235. preIndex := iNdEx
  10236. var wire uint64
  10237. for shift := uint(0); ; shift += 7 {
  10238. if shift >= 64 {
  10239. return ErrIntOverflowTypes
  10240. }
  10241. if iNdEx >= l {
  10242. return io.ErrUnexpectedEOF
  10243. }
  10244. b := dAtA[iNdEx]
  10245. iNdEx++
  10246. wire |= uint64(b&0x7F) << shift
  10247. if b < 0x80 {
  10248. break
  10249. }
  10250. }
  10251. fieldNum := int32(wire >> 3)
  10252. wireType := int(wire & 0x7)
  10253. if wireType == 4 {
  10254. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  10255. }
  10256. if fieldNum <= 0 {
  10257. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  10258. }
  10259. switch fieldNum {
  10260. case 1:
  10261. if wireType != 2 {
  10262. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10263. }
  10264. var stringLen uint64
  10265. for shift := uint(0); ; shift += 7 {
  10266. if shift >= 64 {
  10267. return ErrIntOverflowTypes
  10268. }
  10269. if iNdEx >= l {
  10270. return io.ErrUnexpectedEOF
  10271. }
  10272. b := dAtA[iNdEx]
  10273. iNdEx++
  10274. stringLen |= uint64(b&0x7F) << shift
  10275. if b < 0x80 {
  10276. break
  10277. }
  10278. }
  10279. intStringLen := int(stringLen)
  10280. if intStringLen < 0 {
  10281. return ErrInvalidLengthTypes
  10282. }
  10283. postIndex := iNdEx + intStringLen
  10284. if postIndex < 0 {
  10285. return ErrInvalidLengthTypes
  10286. }
  10287. if postIndex > l {
  10288. return io.ErrUnexpectedEOF
  10289. }
  10290. m.Data = string(dAtA[iNdEx:postIndex])
  10291. iNdEx = postIndex
  10292. case 2:
  10293. if wireType != 2 {
  10294. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  10295. }
  10296. var stringLen uint64
  10297. for shift := uint(0); ; shift += 7 {
  10298. if shift >= 64 {
  10299. return ErrIntOverflowTypes
  10300. }
  10301. if iNdEx >= l {
  10302. return io.ErrUnexpectedEOF
  10303. }
  10304. b := dAtA[iNdEx]
  10305. iNdEx++
  10306. stringLen |= uint64(b&0x7F) << shift
  10307. if b < 0x80 {
  10308. break
  10309. }
  10310. }
  10311. intStringLen := int(stringLen)
  10312. if intStringLen < 0 {
  10313. return ErrInvalidLengthTypes
  10314. }
  10315. postIndex := iNdEx + intStringLen
  10316. if postIndex < 0 {
  10317. return ErrInvalidLengthTypes
  10318. }
  10319. if postIndex > l {
  10320. return io.ErrUnexpectedEOF
  10321. }
  10322. m.Version = string(dAtA[iNdEx:postIndex])
  10323. iNdEx = postIndex
  10324. case 3:
  10325. if wireType != 0 {
  10326. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  10327. }
  10328. m.AppVersion = 0
  10329. for shift := uint(0); ; shift += 7 {
  10330. if shift >= 64 {
  10331. return ErrIntOverflowTypes
  10332. }
  10333. if iNdEx >= l {
  10334. return io.ErrUnexpectedEOF
  10335. }
  10336. b := dAtA[iNdEx]
  10337. iNdEx++
  10338. m.AppVersion |= uint64(b&0x7F) << shift
  10339. if b < 0x80 {
  10340. break
  10341. }
  10342. }
  10343. case 4:
  10344. if wireType != 0 {
  10345. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  10346. }
  10347. m.LastBlockHeight = 0
  10348. for shift := uint(0); ; shift += 7 {
  10349. if shift >= 64 {
  10350. return ErrIntOverflowTypes
  10351. }
  10352. if iNdEx >= l {
  10353. return io.ErrUnexpectedEOF
  10354. }
  10355. b := dAtA[iNdEx]
  10356. iNdEx++
  10357. m.LastBlockHeight |= int64(b&0x7F) << shift
  10358. if b < 0x80 {
  10359. break
  10360. }
  10361. }
  10362. case 5:
  10363. if wireType != 2 {
  10364. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  10365. }
  10366. var byteLen int
  10367. for shift := uint(0); ; shift += 7 {
  10368. if shift >= 64 {
  10369. return ErrIntOverflowTypes
  10370. }
  10371. if iNdEx >= l {
  10372. return io.ErrUnexpectedEOF
  10373. }
  10374. b := dAtA[iNdEx]
  10375. iNdEx++
  10376. byteLen |= int(b&0x7F) << shift
  10377. if b < 0x80 {
  10378. break
  10379. }
  10380. }
  10381. if byteLen < 0 {
  10382. return ErrInvalidLengthTypes
  10383. }
  10384. postIndex := iNdEx + byteLen
  10385. if postIndex < 0 {
  10386. return ErrInvalidLengthTypes
  10387. }
  10388. if postIndex > l {
  10389. return io.ErrUnexpectedEOF
  10390. }
  10391. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  10392. if m.LastBlockAppHash == nil {
  10393. m.LastBlockAppHash = []byte{}
  10394. }
  10395. iNdEx = postIndex
  10396. default:
  10397. iNdEx = preIndex
  10398. skippy, err := skipTypes(dAtA[iNdEx:])
  10399. if err != nil {
  10400. return err
  10401. }
  10402. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10403. return ErrInvalidLengthTypes
  10404. }
  10405. if (iNdEx + skippy) > l {
  10406. return io.ErrUnexpectedEOF
  10407. }
  10408. iNdEx += skippy
  10409. }
  10410. }
  10411. if iNdEx > l {
  10412. return io.ErrUnexpectedEOF
  10413. }
  10414. return nil
  10415. }
  10416. func (m *ResponseSetOption) Unmarshal(dAtA []byte) error {
  10417. l := len(dAtA)
  10418. iNdEx := 0
  10419. for iNdEx < l {
  10420. preIndex := iNdEx
  10421. var wire uint64
  10422. for shift := uint(0); ; shift += 7 {
  10423. if shift >= 64 {
  10424. return ErrIntOverflowTypes
  10425. }
  10426. if iNdEx >= l {
  10427. return io.ErrUnexpectedEOF
  10428. }
  10429. b := dAtA[iNdEx]
  10430. iNdEx++
  10431. wire |= uint64(b&0x7F) << shift
  10432. if b < 0x80 {
  10433. break
  10434. }
  10435. }
  10436. fieldNum := int32(wire >> 3)
  10437. wireType := int(wire & 0x7)
  10438. if wireType == 4 {
  10439. return fmt.Errorf("proto: ResponseSetOption: wiretype end group for non-group")
  10440. }
  10441. if fieldNum <= 0 {
  10442. return fmt.Errorf("proto: ResponseSetOption: illegal tag %d (wire type %d)", fieldNum, wire)
  10443. }
  10444. switch fieldNum {
  10445. case 1:
  10446. if wireType != 0 {
  10447. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10448. }
  10449. m.Code = 0
  10450. for shift := uint(0); ; shift += 7 {
  10451. if shift >= 64 {
  10452. return ErrIntOverflowTypes
  10453. }
  10454. if iNdEx >= l {
  10455. return io.ErrUnexpectedEOF
  10456. }
  10457. b := dAtA[iNdEx]
  10458. iNdEx++
  10459. m.Code |= uint32(b&0x7F) << shift
  10460. if b < 0x80 {
  10461. break
  10462. }
  10463. }
  10464. case 3:
  10465. if wireType != 2 {
  10466. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10467. }
  10468. var stringLen uint64
  10469. for shift := uint(0); ; shift += 7 {
  10470. if shift >= 64 {
  10471. return ErrIntOverflowTypes
  10472. }
  10473. if iNdEx >= l {
  10474. return io.ErrUnexpectedEOF
  10475. }
  10476. b := dAtA[iNdEx]
  10477. iNdEx++
  10478. stringLen |= uint64(b&0x7F) << shift
  10479. if b < 0x80 {
  10480. break
  10481. }
  10482. }
  10483. intStringLen := int(stringLen)
  10484. if intStringLen < 0 {
  10485. return ErrInvalidLengthTypes
  10486. }
  10487. postIndex := iNdEx + intStringLen
  10488. if postIndex < 0 {
  10489. return ErrInvalidLengthTypes
  10490. }
  10491. if postIndex > l {
  10492. return io.ErrUnexpectedEOF
  10493. }
  10494. m.Log = string(dAtA[iNdEx:postIndex])
  10495. iNdEx = postIndex
  10496. case 4:
  10497. if wireType != 2 {
  10498. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10499. }
  10500. var stringLen uint64
  10501. for shift := uint(0); ; shift += 7 {
  10502. if shift >= 64 {
  10503. return ErrIntOverflowTypes
  10504. }
  10505. if iNdEx >= l {
  10506. return io.ErrUnexpectedEOF
  10507. }
  10508. b := dAtA[iNdEx]
  10509. iNdEx++
  10510. stringLen |= uint64(b&0x7F) << shift
  10511. if b < 0x80 {
  10512. break
  10513. }
  10514. }
  10515. intStringLen := int(stringLen)
  10516. if intStringLen < 0 {
  10517. return ErrInvalidLengthTypes
  10518. }
  10519. postIndex := iNdEx + intStringLen
  10520. if postIndex < 0 {
  10521. return ErrInvalidLengthTypes
  10522. }
  10523. if postIndex > l {
  10524. return io.ErrUnexpectedEOF
  10525. }
  10526. m.Info = string(dAtA[iNdEx:postIndex])
  10527. iNdEx = postIndex
  10528. default:
  10529. iNdEx = preIndex
  10530. skippy, err := skipTypes(dAtA[iNdEx:])
  10531. if err != nil {
  10532. return err
  10533. }
  10534. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10535. return ErrInvalidLengthTypes
  10536. }
  10537. if (iNdEx + skippy) > l {
  10538. return io.ErrUnexpectedEOF
  10539. }
  10540. iNdEx += skippy
  10541. }
  10542. }
  10543. if iNdEx > l {
  10544. return io.ErrUnexpectedEOF
  10545. }
  10546. return nil
  10547. }
  10548. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  10549. l := len(dAtA)
  10550. iNdEx := 0
  10551. for iNdEx < l {
  10552. preIndex := iNdEx
  10553. var wire uint64
  10554. for shift := uint(0); ; shift += 7 {
  10555. if shift >= 64 {
  10556. return ErrIntOverflowTypes
  10557. }
  10558. if iNdEx >= l {
  10559. return io.ErrUnexpectedEOF
  10560. }
  10561. b := dAtA[iNdEx]
  10562. iNdEx++
  10563. wire |= uint64(b&0x7F) << shift
  10564. if b < 0x80 {
  10565. break
  10566. }
  10567. }
  10568. fieldNum := int32(wire >> 3)
  10569. wireType := int(wire & 0x7)
  10570. if wireType == 4 {
  10571. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  10572. }
  10573. if fieldNum <= 0 {
  10574. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  10575. }
  10576. switch fieldNum {
  10577. case 1:
  10578. if wireType != 2 {
  10579. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  10580. }
  10581. var msglen int
  10582. for shift := uint(0); ; shift += 7 {
  10583. if shift >= 64 {
  10584. return ErrIntOverflowTypes
  10585. }
  10586. if iNdEx >= l {
  10587. return io.ErrUnexpectedEOF
  10588. }
  10589. b := dAtA[iNdEx]
  10590. iNdEx++
  10591. msglen |= int(b&0x7F) << shift
  10592. if b < 0x80 {
  10593. break
  10594. }
  10595. }
  10596. if msglen < 0 {
  10597. return ErrInvalidLengthTypes
  10598. }
  10599. postIndex := iNdEx + msglen
  10600. if postIndex < 0 {
  10601. return ErrInvalidLengthTypes
  10602. }
  10603. if postIndex > l {
  10604. return io.ErrUnexpectedEOF
  10605. }
  10606. if m.ConsensusParams == nil {
  10607. m.ConsensusParams = &ConsensusParams{}
  10608. }
  10609. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10610. return err
  10611. }
  10612. iNdEx = postIndex
  10613. case 2:
  10614. if wireType != 2 {
  10615. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  10616. }
  10617. var msglen int
  10618. for shift := uint(0); ; shift += 7 {
  10619. if shift >= 64 {
  10620. return ErrIntOverflowTypes
  10621. }
  10622. if iNdEx >= l {
  10623. return io.ErrUnexpectedEOF
  10624. }
  10625. b := dAtA[iNdEx]
  10626. iNdEx++
  10627. msglen |= int(b&0x7F) << shift
  10628. if b < 0x80 {
  10629. break
  10630. }
  10631. }
  10632. if msglen < 0 {
  10633. return ErrInvalidLengthTypes
  10634. }
  10635. postIndex := iNdEx + msglen
  10636. if postIndex < 0 {
  10637. return ErrInvalidLengthTypes
  10638. }
  10639. if postIndex > l {
  10640. return io.ErrUnexpectedEOF
  10641. }
  10642. m.Validators = append(m.Validators, ValidatorUpdate{})
  10643. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10644. return err
  10645. }
  10646. iNdEx = postIndex
  10647. case 3:
  10648. if wireType != 2 {
  10649. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  10650. }
  10651. var byteLen int
  10652. for shift := uint(0); ; shift += 7 {
  10653. if shift >= 64 {
  10654. return ErrIntOverflowTypes
  10655. }
  10656. if iNdEx >= l {
  10657. return io.ErrUnexpectedEOF
  10658. }
  10659. b := dAtA[iNdEx]
  10660. iNdEx++
  10661. byteLen |= int(b&0x7F) << shift
  10662. if b < 0x80 {
  10663. break
  10664. }
  10665. }
  10666. if byteLen < 0 {
  10667. return ErrInvalidLengthTypes
  10668. }
  10669. postIndex := iNdEx + byteLen
  10670. if postIndex < 0 {
  10671. return ErrInvalidLengthTypes
  10672. }
  10673. if postIndex > l {
  10674. return io.ErrUnexpectedEOF
  10675. }
  10676. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  10677. if m.AppHash == nil {
  10678. m.AppHash = []byte{}
  10679. }
  10680. iNdEx = postIndex
  10681. default:
  10682. iNdEx = preIndex
  10683. skippy, err := skipTypes(dAtA[iNdEx:])
  10684. if err != nil {
  10685. return err
  10686. }
  10687. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10688. return ErrInvalidLengthTypes
  10689. }
  10690. if (iNdEx + skippy) > l {
  10691. return io.ErrUnexpectedEOF
  10692. }
  10693. iNdEx += skippy
  10694. }
  10695. }
  10696. if iNdEx > l {
  10697. return io.ErrUnexpectedEOF
  10698. }
  10699. return nil
  10700. }
  10701. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  10702. l := len(dAtA)
  10703. iNdEx := 0
  10704. for iNdEx < l {
  10705. preIndex := iNdEx
  10706. var wire uint64
  10707. for shift := uint(0); ; shift += 7 {
  10708. if shift >= 64 {
  10709. return ErrIntOverflowTypes
  10710. }
  10711. if iNdEx >= l {
  10712. return io.ErrUnexpectedEOF
  10713. }
  10714. b := dAtA[iNdEx]
  10715. iNdEx++
  10716. wire |= uint64(b&0x7F) << shift
  10717. if b < 0x80 {
  10718. break
  10719. }
  10720. }
  10721. fieldNum := int32(wire >> 3)
  10722. wireType := int(wire & 0x7)
  10723. if wireType == 4 {
  10724. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  10725. }
  10726. if fieldNum <= 0 {
  10727. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  10728. }
  10729. switch fieldNum {
  10730. case 1:
  10731. if wireType != 0 {
  10732. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10733. }
  10734. m.Code = 0
  10735. for shift := uint(0); ; shift += 7 {
  10736. if shift >= 64 {
  10737. return ErrIntOverflowTypes
  10738. }
  10739. if iNdEx >= l {
  10740. return io.ErrUnexpectedEOF
  10741. }
  10742. b := dAtA[iNdEx]
  10743. iNdEx++
  10744. m.Code |= uint32(b&0x7F) << shift
  10745. if b < 0x80 {
  10746. break
  10747. }
  10748. }
  10749. case 3:
  10750. if wireType != 2 {
  10751. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10752. }
  10753. var stringLen uint64
  10754. for shift := uint(0); ; shift += 7 {
  10755. if shift >= 64 {
  10756. return ErrIntOverflowTypes
  10757. }
  10758. if iNdEx >= l {
  10759. return io.ErrUnexpectedEOF
  10760. }
  10761. b := dAtA[iNdEx]
  10762. iNdEx++
  10763. stringLen |= uint64(b&0x7F) << shift
  10764. if b < 0x80 {
  10765. break
  10766. }
  10767. }
  10768. intStringLen := int(stringLen)
  10769. if intStringLen < 0 {
  10770. return ErrInvalidLengthTypes
  10771. }
  10772. postIndex := iNdEx + intStringLen
  10773. if postIndex < 0 {
  10774. return ErrInvalidLengthTypes
  10775. }
  10776. if postIndex > l {
  10777. return io.ErrUnexpectedEOF
  10778. }
  10779. m.Log = string(dAtA[iNdEx:postIndex])
  10780. iNdEx = postIndex
  10781. case 4:
  10782. if wireType != 2 {
  10783. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10784. }
  10785. var stringLen uint64
  10786. for shift := uint(0); ; shift += 7 {
  10787. if shift >= 64 {
  10788. return ErrIntOverflowTypes
  10789. }
  10790. if iNdEx >= l {
  10791. return io.ErrUnexpectedEOF
  10792. }
  10793. b := dAtA[iNdEx]
  10794. iNdEx++
  10795. stringLen |= uint64(b&0x7F) << shift
  10796. if b < 0x80 {
  10797. break
  10798. }
  10799. }
  10800. intStringLen := int(stringLen)
  10801. if intStringLen < 0 {
  10802. return ErrInvalidLengthTypes
  10803. }
  10804. postIndex := iNdEx + intStringLen
  10805. if postIndex < 0 {
  10806. return ErrInvalidLengthTypes
  10807. }
  10808. if postIndex > l {
  10809. return io.ErrUnexpectedEOF
  10810. }
  10811. m.Info = string(dAtA[iNdEx:postIndex])
  10812. iNdEx = postIndex
  10813. case 5:
  10814. if wireType != 0 {
  10815. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10816. }
  10817. m.Index = 0
  10818. for shift := uint(0); ; shift += 7 {
  10819. if shift >= 64 {
  10820. return ErrIntOverflowTypes
  10821. }
  10822. if iNdEx >= l {
  10823. return io.ErrUnexpectedEOF
  10824. }
  10825. b := dAtA[iNdEx]
  10826. iNdEx++
  10827. m.Index |= int64(b&0x7F) << shift
  10828. if b < 0x80 {
  10829. break
  10830. }
  10831. }
  10832. case 6:
  10833. if wireType != 2 {
  10834. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10835. }
  10836. var byteLen int
  10837. for shift := uint(0); ; shift += 7 {
  10838. if shift >= 64 {
  10839. return ErrIntOverflowTypes
  10840. }
  10841. if iNdEx >= l {
  10842. return io.ErrUnexpectedEOF
  10843. }
  10844. b := dAtA[iNdEx]
  10845. iNdEx++
  10846. byteLen |= int(b&0x7F) << shift
  10847. if b < 0x80 {
  10848. break
  10849. }
  10850. }
  10851. if byteLen < 0 {
  10852. return ErrInvalidLengthTypes
  10853. }
  10854. postIndex := iNdEx + byteLen
  10855. if postIndex < 0 {
  10856. return ErrInvalidLengthTypes
  10857. }
  10858. if postIndex > l {
  10859. return io.ErrUnexpectedEOF
  10860. }
  10861. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10862. if m.Key == nil {
  10863. m.Key = []byte{}
  10864. }
  10865. iNdEx = postIndex
  10866. case 7:
  10867. if wireType != 2 {
  10868. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10869. }
  10870. var byteLen int
  10871. for shift := uint(0); ; shift += 7 {
  10872. if shift >= 64 {
  10873. return ErrIntOverflowTypes
  10874. }
  10875. if iNdEx >= l {
  10876. return io.ErrUnexpectedEOF
  10877. }
  10878. b := dAtA[iNdEx]
  10879. iNdEx++
  10880. byteLen |= int(b&0x7F) << shift
  10881. if b < 0x80 {
  10882. break
  10883. }
  10884. }
  10885. if byteLen < 0 {
  10886. return ErrInvalidLengthTypes
  10887. }
  10888. postIndex := iNdEx + byteLen
  10889. if postIndex < 0 {
  10890. return ErrInvalidLengthTypes
  10891. }
  10892. if postIndex > l {
  10893. return io.ErrUnexpectedEOF
  10894. }
  10895. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10896. if m.Value == nil {
  10897. m.Value = []byte{}
  10898. }
  10899. iNdEx = postIndex
  10900. case 8:
  10901. if wireType != 2 {
  10902. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10903. }
  10904. var msglen int
  10905. for shift := uint(0); ; shift += 7 {
  10906. if shift >= 64 {
  10907. return ErrIntOverflowTypes
  10908. }
  10909. if iNdEx >= l {
  10910. return io.ErrUnexpectedEOF
  10911. }
  10912. b := dAtA[iNdEx]
  10913. iNdEx++
  10914. msglen |= int(b&0x7F) << shift
  10915. if b < 0x80 {
  10916. break
  10917. }
  10918. }
  10919. if msglen < 0 {
  10920. return ErrInvalidLengthTypes
  10921. }
  10922. postIndex := iNdEx + msglen
  10923. if postIndex < 0 {
  10924. return ErrInvalidLengthTypes
  10925. }
  10926. if postIndex > l {
  10927. return io.ErrUnexpectedEOF
  10928. }
  10929. if m.ProofOps == nil {
  10930. m.ProofOps = &crypto.ProofOps{}
  10931. }
  10932. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10933. return err
  10934. }
  10935. iNdEx = postIndex
  10936. case 9:
  10937. if wireType != 0 {
  10938. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10939. }
  10940. m.Height = 0
  10941. for shift := uint(0); ; shift += 7 {
  10942. if shift >= 64 {
  10943. return ErrIntOverflowTypes
  10944. }
  10945. if iNdEx >= l {
  10946. return io.ErrUnexpectedEOF
  10947. }
  10948. b := dAtA[iNdEx]
  10949. iNdEx++
  10950. m.Height |= int64(b&0x7F) << shift
  10951. if b < 0x80 {
  10952. break
  10953. }
  10954. }
  10955. case 10:
  10956. if wireType != 2 {
  10957. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10958. }
  10959. var stringLen uint64
  10960. for shift := uint(0); ; shift += 7 {
  10961. if shift >= 64 {
  10962. return ErrIntOverflowTypes
  10963. }
  10964. if iNdEx >= l {
  10965. return io.ErrUnexpectedEOF
  10966. }
  10967. b := dAtA[iNdEx]
  10968. iNdEx++
  10969. stringLen |= uint64(b&0x7F) << shift
  10970. if b < 0x80 {
  10971. break
  10972. }
  10973. }
  10974. intStringLen := int(stringLen)
  10975. if intStringLen < 0 {
  10976. return ErrInvalidLengthTypes
  10977. }
  10978. postIndex := iNdEx + intStringLen
  10979. if postIndex < 0 {
  10980. return ErrInvalidLengthTypes
  10981. }
  10982. if postIndex > l {
  10983. return io.ErrUnexpectedEOF
  10984. }
  10985. m.Codespace = string(dAtA[iNdEx:postIndex])
  10986. iNdEx = postIndex
  10987. default:
  10988. iNdEx = preIndex
  10989. skippy, err := skipTypes(dAtA[iNdEx:])
  10990. if err != nil {
  10991. return err
  10992. }
  10993. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10994. return ErrInvalidLengthTypes
  10995. }
  10996. if (iNdEx + skippy) > l {
  10997. return io.ErrUnexpectedEOF
  10998. }
  10999. iNdEx += skippy
  11000. }
  11001. }
  11002. if iNdEx > l {
  11003. return io.ErrUnexpectedEOF
  11004. }
  11005. return nil
  11006. }
  11007. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  11008. l := len(dAtA)
  11009. iNdEx := 0
  11010. for iNdEx < l {
  11011. preIndex := iNdEx
  11012. var wire uint64
  11013. for shift := uint(0); ; shift += 7 {
  11014. if shift >= 64 {
  11015. return ErrIntOverflowTypes
  11016. }
  11017. if iNdEx >= l {
  11018. return io.ErrUnexpectedEOF
  11019. }
  11020. b := dAtA[iNdEx]
  11021. iNdEx++
  11022. wire |= uint64(b&0x7F) << shift
  11023. if b < 0x80 {
  11024. break
  11025. }
  11026. }
  11027. fieldNum := int32(wire >> 3)
  11028. wireType := int(wire & 0x7)
  11029. if wireType == 4 {
  11030. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  11031. }
  11032. if fieldNum <= 0 {
  11033. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11034. }
  11035. switch fieldNum {
  11036. case 1:
  11037. if wireType != 2 {
  11038. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11039. }
  11040. var msglen int
  11041. for shift := uint(0); ; shift += 7 {
  11042. if shift >= 64 {
  11043. return ErrIntOverflowTypes
  11044. }
  11045. if iNdEx >= l {
  11046. return io.ErrUnexpectedEOF
  11047. }
  11048. b := dAtA[iNdEx]
  11049. iNdEx++
  11050. msglen |= int(b&0x7F) << shift
  11051. if b < 0x80 {
  11052. break
  11053. }
  11054. }
  11055. if msglen < 0 {
  11056. return ErrInvalidLengthTypes
  11057. }
  11058. postIndex := iNdEx + msglen
  11059. if postIndex < 0 {
  11060. return ErrInvalidLengthTypes
  11061. }
  11062. if postIndex > l {
  11063. return io.ErrUnexpectedEOF
  11064. }
  11065. m.Events = append(m.Events, Event{})
  11066. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11067. return err
  11068. }
  11069. iNdEx = postIndex
  11070. default:
  11071. iNdEx = preIndex
  11072. skippy, err := skipTypes(dAtA[iNdEx:])
  11073. if err != nil {
  11074. return err
  11075. }
  11076. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11077. return ErrInvalidLengthTypes
  11078. }
  11079. if (iNdEx + skippy) > l {
  11080. return io.ErrUnexpectedEOF
  11081. }
  11082. iNdEx += skippy
  11083. }
  11084. }
  11085. if iNdEx > l {
  11086. return io.ErrUnexpectedEOF
  11087. }
  11088. return nil
  11089. }
  11090. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  11091. l := len(dAtA)
  11092. iNdEx := 0
  11093. for iNdEx < l {
  11094. preIndex := iNdEx
  11095. var wire uint64
  11096. for shift := uint(0); ; shift += 7 {
  11097. if shift >= 64 {
  11098. return ErrIntOverflowTypes
  11099. }
  11100. if iNdEx >= l {
  11101. return io.ErrUnexpectedEOF
  11102. }
  11103. b := dAtA[iNdEx]
  11104. iNdEx++
  11105. wire |= uint64(b&0x7F) << shift
  11106. if b < 0x80 {
  11107. break
  11108. }
  11109. }
  11110. fieldNum := int32(wire >> 3)
  11111. wireType := int(wire & 0x7)
  11112. if wireType == 4 {
  11113. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  11114. }
  11115. if fieldNum <= 0 {
  11116. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  11117. }
  11118. switch fieldNum {
  11119. case 1:
  11120. if wireType != 0 {
  11121. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  11122. }
  11123. m.Code = 0
  11124. for shift := uint(0); ; shift += 7 {
  11125. if shift >= 64 {
  11126. return ErrIntOverflowTypes
  11127. }
  11128. if iNdEx >= l {
  11129. return io.ErrUnexpectedEOF
  11130. }
  11131. b := dAtA[iNdEx]
  11132. iNdEx++
  11133. m.Code |= uint32(b&0x7F) << shift
  11134. if b < 0x80 {
  11135. break
  11136. }
  11137. }
  11138. case 2:
  11139. if wireType != 2 {
  11140. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11141. }
  11142. var byteLen int
  11143. for shift := uint(0); ; shift += 7 {
  11144. if shift >= 64 {
  11145. return ErrIntOverflowTypes
  11146. }
  11147. if iNdEx >= l {
  11148. return io.ErrUnexpectedEOF
  11149. }
  11150. b := dAtA[iNdEx]
  11151. iNdEx++
  11152. byteLen |= int(b&0x7F) << shift
  11153. if b < 0x80 {
  11154. break
  11155. }
  11156. }
  11157. if byteLen < 0 {
  11158. return ErrInvalidLengthTypes
  11159. }
  11160. postIndex := iNdEx + byteLen
  11161. if postIndex < 0 {
  11162. return ErrInvalidLengthTypes
  11163. }
  11164. if postIndex > l {
  11165. return io.ErrUnexpectedEOF
  11166. }
  11167. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11168. if m.Data == nil {
  11169. m.Data = []byte{}
  11170. }
  11171. iNdEx = postIndex
  11172. case 3:
  11173. if wireType != 2 {
  11174. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  11175. }
  11176. var stringLen uint64
  11177. for shift := uint(0); ; shift += 7 {
  11178. if shift >= 64 {
  11179. return ErrIntOverflowTypes
  11180. }
  11181. if iNdEx >= l {
  11182. return io.ErrUnexpectedEOF
  11183. }
  11184. b := dAtA[iNdEx]
  11185. iNdEx++
  11186. stringLen |= uint64(b&0x7F) << shift
  11187. if b < 0x80 {
  11188. break
  11189. }
  11190. }
  11191. intStringLen := int(stringLen)
  11192. if intStringLen < 0 {
  11193. return ErrInvalidLengthTypes
  11194. }
  11195. postIndex := iNdEx + intStringLen
  11196. if postIndex < 0 {
  11197. return ErrInvalidLengthTypes
  11198. }
  11199. if postIndex > l {
  11200. return io.ErrUnexpectedEOF
  11201. }
  11202. m.Log = string(dAtA[iNdEx:postIndex])
  11203. iNdEx = postIndex
  11204. case 4:
  11205. if wireType != 2 {
  11206. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  11207. }
  11208. var stringLen uint64
  11209. for shift := uint(0); ; shift += 7 {
  11210. if shift >= 64 {
  11211. return ErrIntOverflowTypes
  11212. }
  11213. if iNdEx >= l {
  11214. return io.ErrUnexpectedEOF
  11215. }
  11216. b := dAtA[iNdEx]
  11217. iNdEx++
  11218. stringLen |= uint64(b&0x7F) << shift
  11219. if b < 0x80 {
  11220. break
  11221. }
  11222. }
  11223. intStringLen := int(stringLen)
  11224. if intStringLen < 0 {
  11225. return ErrInvalidLengthTypes
  11226. }
  11227. postIndex := iNdEx + intStringLen
  11228. if postIndex < 0 {
  11229. return ErrInvalidLengthTypes
  11230. }
  11231. if postIndex > l {
  11232. return io.ErrUnexpectedEOF
  11233. }
  11234. m.Info = string(dAtA[iNdEx:postIndex])
  11235. iNdEx = postIndex
  11236. case 5:
  11237. if wireType != 0 {
  11238. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  11239. }
  11240. m.GasWanted = 0
  11241. for shift := uint(0); ; shift += 7 {
  11242. if shift >= 64 {
  11243. return ErrIntOverflowTypes
  11244. }
  11245. if iNdEx >= l {
  11246. return io.ErrUnexpectedEOF
  11247. }
  11248. b := dAtA[iNdEx]
  11249. iNdEx++
  11250. m.GasWanted |= int64(b&0x7F) << shift
  11251. if b < 0x80 {
  11252. break
  11253. }
  11254. }
  11255. case 6:
  11256. if wireType != 0 {
  11257. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  11258. }
  11259. m.GasUsed = 0
  11260. for shift := uint(0); ; shift += 7 {
  11261. if shift >= 64 {
  11262. return ErrIntOverflowTypes
  11263. }
  11264. if iNdEx >= l {
  11265. return io.ErrUnexpectedEOF
  11266. }
  11267. b := dAtA[iNdEx]
  11268. iNdEx++
  11269. m.GasUsed |= int64(b&0x7F) << shift
  11270. if b < 0x80 {
  11271. break
  11272. }
  11273. }
  11274. case 7:
  11275. if wireType != 2 {
  11276. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11277. }
  11278. var msglen int
  11279. for shift := uint(0); ; shift += 7 {
  11280. if shift >= 64 {
  11281. return ErrIntOverflowTypes
  11282. }
  11283. if iNdEx >= l {
  11284. return io.ErrUnexpectedEOF
  11285. }
  11286. b := dAtA[iNdEx]
  11287. iNdEx++
  11288. msglen |= int(b&0x7F) << shift
  11289. if b < 0x80 {
  11290. break
  11291. }
  11292. }
  11293. if msglen < 0 {
  11294. return ErrInvalidLengthTypes
  11295. }
  11296. postIndex := iNdEx + msglen
  11297. if postIndex < 0 {
  11298. return ErrInvalidLengthTypes
  11299. }
  11300. if postIndex > l {
  11301. return io.ErrUnexpectedEOF
  11302. }
  11303. m.Events = append(m.Events, Event{})
  11304. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11305. return err
  11306. }
  11307. iNdEx = postIndex
  11308. case 8:
  11309. if wireType != 2 {
  11310. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  11311. }
  11312. var stringLen uint64
  11313. for shift := uint(0); ; shift += 7 {
  11314. if shift >= 64 {
  11315. return ErrIntOverflowTypes
  11316. }
  11317. if iNdEx >= l {
  11318. return io.ErrUnexpectedEOF
  11319. }
  11320. b := dAtA[iNdEx]
  11321. iNdEx++
  11322. stringLen |= uint64(b&0x7F) << shift
  11323. if b < 0x80 {
  11324. break
  11325. }
  11326. }
  11327. intStringLen := int(stringLen)
  11328. if intStringLen < 0 {
  11329. return ErrInvalidLengthTypes
  11330. }
  11331. postIndex := iNdEx + intStringLen
  11332. if postIndex < 0 {
  11333. return ErrInvalidLengthTypes
  11334. }
  11335. if postIndex > l {
  11336. return io.ErrUnexpectedEOF
  11337. }
  11338. m.Codespace = string(dAtA[iNdEx:postIndex])
  11339. iNdEx = postIndex
  11340. default:
  11341. iNdEx = preIndex
  11342. skippy, err := skipTypes(dAtA[iNdEx:])
  11343. if err != nil {
  11344. return err
  11345. }
  11346. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11347. return ErrInvalidLengthTypes
  11348. }
  11349. if (iNdEx + skippy) > l {
  11350. return io.ErrUnexpectedEOF
  11351. }
  11352. iNdEx += skippy
  11353. }
  11354. }
  11355. if iNdEx > l {
  11356. return io.ErrUnexpectedEOF
  11357. }
  11358. return nil
  11359. }
  11360. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  11361. l := len(dAtA)
  11362. iNdEx := 0
  11363. for iNdEx < l {
  11364. preIndex := iNdEx
  11365. var wire uint64
  11366. for shift := uint(0); ; shift += 7 {
  11367. if shift >= 64 {
  11368. return ErrIntOverflowTypes
  11369. }
  11370. if iNdEx >= l {
  11371. return io.ErrUnexpectedEOF
  11372. }
  11373. b := dAtA[iNdEx]
  11374. iNdEx++
  11375. wire |= uint64(b&0x7F) << shift
  11376. if b < 0x80 {
  11377. break
  11378. }
  11379. }
  11380. fieldNum := int32(wire >> 3)
  11381. wireType := int(wire & 0x7)
  11382. if wireType == 4 {
  11383. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  11384. }
  11385. if fieldNum <= 0 {
  11386. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  11387. }
  11388. switch fieldNum {
  11389. case 1:
  11390. if wireType != 0 {
  11391. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  11392. }
  11393. m.Code = 0
  11394. for shift := uint(0); ; shift += 7 {
  11395. if shift >= 64 {
  11396. return ErrIntOverflowTypes
  11397. }
  11398. if iNdEx >= l {
  11399. return io.ErrUnexpectedEOF
  11400. }
  11401. b := dAtA[iNdEx]
  11402. iNdEx++
  11403. m.Code |= uint32(b&0x7F) << shift
  11404. if b < 0x80 {
  11405. break
  11406. }
  11407. }
  11408. case 2:
  11409. if wireType != 2 {
  11410. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11411. }
  11412. var byteLen int
  11413. for shift := uint(0); ; shift += 7 {
  11414. if shift >= 64 {
  11415. return ErrIntOverflowTypes
  11416. }
  11417. if iNdEx >= l {
  11418. return io.ErrUnexpectedEOF
  11419. }
  11420. b := dAtA[iNdEx]
  11421. iNdEx++
  11422. byteLen |= int(b&0x7F) << shift
  11423. if b < 0x80 {
  11424. break
  11425. }
  11426. }
  11427. if byteLen < 0 {
  11428. return ErrInvalidLengthTypes
  11429. }
  11430. postIndex := iNdEx + byteLen
  11431. if postIndex < 0 {
  11432. return ErrInvalidLengthTypes
  11433. }
  11434. if postIndex > l {
  11435. return io.ErrUnexpectedEOF
  11436. }
  11437. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11438. if m.Data == nil {
  11439. m.Data = []byte{}
  11440. }
  11441. iNdEx = postIndex
  11442. case 3:
  11443. if wireType != 2 {
  11444. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  11445. }
  11446. var stringLen uint64
  11447. for shift := uint(0); ; shift += 7 {
  11448. if shift >= 64 {
  11449. return ErrIntOverflowTypes
  11450. }
  11451. if iNdEx >= l {
  11452. return io.ErrUnexpectedEOF
  11453. }
  11454. b := dAtA[iNdEx]
  11455. iNdEx++
  11456. stringLen |= uint64(b&0x7F) << shift
  11457. if b < 0x80 {
  11458. break
  11459. }
  11460. }
  11461. intStringLen := int(stringLen)
  11462. if intStringLen < 0 {
  11463. return ErrInvalidLengthTypes
  11464. }
  11465. postIndex := iNdEx + intStringLen
  11466. if postIndex < 0 {
  11467. return ErrInvalidLengthTypes
  11468. }
  11469. if postIndex > l {
  11470. return io.ErrUnexpectedEOF
  11471. }
  11472. m.Log = string(dAtA[iNdEx:postIndex])
  11473. iNdEx = postIndex
  11474. case 4:
  11475. if wireType != 2 {
  11476. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  11477. }
  11478. var stringLen uint64
  11479. for shift := uint(0); ; shift += 7 {
  11480. if shift >= 64 {
  11481. return ErrIntOverflowTypes
  11482. }
  11483. if iNdEx >= l {
  11484. return io.ErrUnexpectedEOF
  11485. }
  11486. b := dAtA[iNdEx]
  11487. iNdEx++
  11488. stringLen |= uint64(b&0x7F) << shift
  11489. if b < 0x80 {
  11490. break
  11491. }
  11492. }
  11493. intStringLen := int(stringLen)
  11494. if intStringLen < 0 {
  11495. return ErrInvalidLengthTypes
  11496. }
  11497. postIndex := iNdEx + intStringLen
  11498. if postIndex < 0 {
  11499. return ErrInvalidLengthTypes
  11500. }
  11501. if postIndex > l {
  11502. return io.ErrUnexpectedEOF
  11503. }
  11504. m.Info = string(dAtA[iNdEx:postIndex])
  11505. iNdEx = postIndex
  11506. case 5:
  11507. if wireType != 0 {
  11508. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  11509. }
  11510. m.GasWanted = 0
  11511. for shift := uint(0); ; shift += 7 {
  11512. if shift >= 64 {
  11513. return ErrIntOverflowTypes
  11514. }
  11515. if iNdEx >= l {
  11516. return io.ErrUnexpectedEOF
  11517. }
  11518. b := dAtA[iNdEx]
  11519. iNdEx++
  11520. m.GasWanted |= int64(b&0x7F) << shift
  11521. if b < 0x80 {
  11522. break
  11523. }
  11524. }
  11525. case 6:
  11526. if wireType != 0 {
  11527. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  11528. }
  11529. m.GasUsed = 0
  11530. for shift := uint(0); ; shift += 7 {
  11531. if shift >= 64 {
  11532. return ErrIntOverflowTypes
  11533. }
  11534. if iNdEx >= l {
  11535. return io.ErrUnexpectedEOF
  11536. }
  11537. b := dAtA[iNdEx]
  11538. iNdEx++
  11539. m.GasUsed |= int64(b&0x7F) << shift
  11540. if b < 0x80 {
  11541. break
  11542. }
  11543. }
  11544. case 7:
  11545. if wireType != 2 {
  11546. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11547. }
  11548. var msglen int
  11549. for shift := uint(0); ; shift += 7 {
  11550. if shift >= 64 {
  11551. return ErrIntOverflowTypes
  11552. }
  11553. if iNdEx >= l {
  11554. return io.ErrUnexpectedEOF
  11555. }
  11556. b := dAtA[iNdEx]
  11557. iNdEx++
  11558. msglen |= int(b&0x7F) << shift
  11559. if b < 0x80 {
  11560. break
  11561. }
  11562. }
  11563. if msglen < 0 {
  11564. return ErrInvalidLengthTypes
  11565. }
  11566. postIndex := iNdEx + msglen
  11567. if postIndex < 0 {
  11568. return ErrInvalidLengthTypes
  11569. }
  11570. if postIndex > l {
  11571. return io.ErrUnexpectedEOF
  11572. }
  11573. m.Events = append(m.Events, Event{})
  11574. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11575. return err
  11576. }
  11577. iNdEx = postIndex
  11578. case 8:
  11579. if wireType != 2 {
  11580. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  11581. }
  11582. var stringLen uint64
  11583. for shift := uint(0); ; shift += 7 {
  11584. if shift >= 64 {
  11585. return ErrIntOverflowTypes
  11586. }
  11587. if iNdEx >= l {
  11588. return io.ErrUnexpectedEOF
  11589. }
  11590. b := dAtA[iNdEx]
  11591. iNdEx++
  11592. stringLen |= uint64(b&0x7F) << shift
  11593. if b < 0x80 {
  11594. break
  11595. }
  11596. }
  11597. intStringLen := int(stringLen)
  11598. if intStringLen < 0 {
  11599. return ErrInvalidLengthTypes
  11600. }
  11601. postIndex := iNdEx + intStringLen
  11602. if postIndex < 0 {
  11603. return ErrInvalidLengthTypes
  11604. }
  11605. if postIndex > l {
  11606. return io.ErrUnexpectedEOF
  11607. }
  11608. m.Codespace = string(dAtA[iNdEx:postIndex])
  11609. iNdEx = postIndex
  11610. default:
  11611. iNdEx = preIndex
  11612. skippy, err := skipTypes(dAtA[iNdEx:])
  11613. if err != nil {
  11614. return err
  11615. }
  11616. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11617. return ErrInvalidLengthTypes
  11618. }
  11619. if (iNdEx + skippy) > l {
  11620. return io.ErrUnexpectedEOF
  11621. }
  11622. iNdEx += skippy
  11623. }
  11624. }
  11625. if iNdEx > l {
  11626. return io.ErrUnexpectedEOF
  11627. }
  11628. return nil
  11629. }
  11630. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  11631. l := len(dAtA)
  11632. iNdEx := 0
  11633. for iNdEx < l {
  11634. preIndex := iNdEx
  11635. var wire uint64
  11636. for shift := uint(0); ; shift += 7 {
  11637. if shift >= 64 {
  11638. return ErrIntOverflowTypes
  11639. }
  11640. if iNdEx >= l {
  11641. return io.ErrUnexpectedEOF
  11642. }
  11643. b := dAtA[iNdEx]
  11644. iNdEx++
  11645. wire |= uint64(b&0x7F) << shift
  11646. if b < 0x80 {
  11647. break
  11648. }
  11649. }
  11650. fieldNum := int32(wire >> 3)
  11651. wireType := int(wire & 0x7)
  11652. if wireType == 4 {
  11653. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  11654. }
  11655. if fieldNum <= 0 {
  11656. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11657. }
  11658. switch fieldNum {
  11659. case 1:
  11660. if wireType != 2 {
  11661. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  11662. }
  11663. var msglen int
  11664. for shift := uint(0); ; shift += 7 {
  11665. if shift >= 64 {
  11666. return ErrIntOverflowTypes
  11667. }
  11668. if iNdEx >= l {
  11669. return io.ErrUnexpectedEOF
  11670. }
  11671. b := dAtA[iNdEx]
  11672. iNdEx++
  11673. msglen |= int(b&0x7F) << shift
  11674. if b < 0x80 {
  11675. break
  11676. }
  11677. }
  11678. if msglen < 0 {
  11679. return ErrInvalidLengthTypes
  11680. }
  11681. postIndex := iNdEx + msglen
  11682. if postIndex < 0 {
  11683. return ErrInvalidLengthTypes
  11684. }
  11685. if postIndex > l {
  11686. return io.ErrUnexpectedEOF
  11687. }
  11688. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  11689. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11690. return err
  11691. }
  11692. iNdEx = postIndex
  11693. case 2:
  11694. if wireType != 2 {
  11695. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  11696. }
  11697. var msglen int
  11698. for shift := uint(0); ; shift += 7 {
  11699. if shift >= 64 {
  11700. return ErrIntOverflowTypes
  11701. }
  11702. if iNdEx >= l {
  11703. return io.ErrUnexpectedEOF
  11704. }
  11705. b := dAtA[iNdEx]
  11706. iNdEx++
  11707. msglen |= int(b&0x7F) << shift
  11708. if b < 0x80 {
  11709. break
  11710. }
  11711. }
  11712. if msglen < 0 {
  11713. return ErrInvalidLengthTypes
  11714. }
  11715. postIndex := iNdEx + msglen
  11716. if postIndex < 0 {
  11717. return ErrInvalidLengthTypes
  11718. }
  11719. if postIndex > l {
  11720. return io.ErrUnexpectedEOF
  11721. }
  11722. if m.ConsensusParamUpdates == nil {
  11723. m.ConsensusParamUpdates = &ConsensusParams{}
  11724. }
  11725. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11726. return err
  11727. }
  11728. iNdEx = postIndex
  11729. case 3:
  11730. if wireType != 2 {
  11731. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11732. }
  11733. var msglen int
  11734. for shift := uint(0); ; shift += 7 {
  11735. if shift >= 64 {
  11736. return ErrIntOverflowTypes
  11737. }
  11738. if iNdEx >= l {
  11739. return io.ErrUnexpectedEOF
  11740. }
  11741. b := dAtA[iNdEx]
  11742. iNdEx++
  11743. msglen |= int(b&0x7F) << shift
  11744. if b < 0x80 {
  11745. break
  11746. }
  11747. }
  11748. if msglen < 0 {
  11749. return ErrInvalidLengthTypes
  11750. }
  11751. postIndex := iNdEx + msglen
  11752. if postIndex < 0 {
  11753. return ErrInvalidLengthTypes
  11754. }
  11755. if postIndex > l {
  11756. return io.ErrUnexpectedEOF
  11757. }
  11758. m.Events = append(m.Events, Event{})
  11759. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11760. return err
  11761. }
  11762. iNdEx = postIndex
  11763. default:
  11764. iNdEx = preIndex
  11765. skippy, err := skipTypes(dAtA[iNdEx:])
  11766. if err != nil {
  11767. return err
  11768. }
  11769. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11770. return ErrInvalidLengthTypes
  11771. }
  11772. if (iNdEx + skippy) > l {
  11773. return io.ErrUnexpectedEOF
  11774. }
  11775. iNdEx += skippy
  11776. }
  11777. }
  11778. if iNdEx > l {
  11779. return io.ErrUnexpectedEOF
  11780. }
  11781. return nil
  11782. }
  11783. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11784. l := len(dAtA)
  11785. iNdEx := 0
  11786. for iNdEx < l {
  11787. preIndex := iNdEx
  11788. var wire uint64
  11789. for shift := uint(0); ; shift += 7 {
  11790. if shift >= 64 {
  11791. return ErrIntOverflowTypes
  11792. }
  11793. if iNdEx >= l {
  11794. return io.ErrUnexpectedEOF
  11795. }
  11796. b := dAtA[iNdEx]
  11797. iNdEx++
  11798. wire |= uint64(b&0x7F) << shift
  11799. if b < 0x80 {
  11800. break
  11801. }
  11802. }
  11803. fieldNum := int32(wire >> 3)
  11804. wireType := int(wire & 0x7)
  11805. if wireType == 4 {
  11806. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11807. }
  11808. if fieldNum <= 0 {
  11809. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11810. }
  11811. switch fieldNum {
  11812. case 2:
  11813. if wireType != 2 {
  11814. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11815. }
  11816. var byteLen int
  11817. for shift := uint(0); ; shift += 7 {
  11818. if shift >= 64 {
  11819. return ErrIntOverflowTypes
  11820. }
  11821. if iNdEx >= l {
  11822. return io.ErrUnexpectedEOF
  11823. }
  11824. b := dAtA[iNdEx]
  11825. iNdEx++
  11826. byteLen |= int(b&0x7F) << shift
  11827. if b < 0x80 {
  11828. break
  11829. }
  11830. }
  11831. if byteLen < 0 {
  11832. return ErrInvalidLengthTypes
  11833. }
  11834. postIndex := iNdEx + byteLen
  11835. if postIndex < 0 {
  11836. return ErrInvalidLengthTypes
  11837. }
  11838. if postIndex > l {
  11839. return io.ErrUnexpectedEOF
  11840. }
  11841. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11842. if m.Data == nil {
  11843. m.Data = []byte{}
  11844. }
  11845. iNdEx = postIndex
  11846. case 3:
  11847. if wireType != 0 {
  11848. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11849. }
  11850. m.RetainHeight = 0
  11851. for shift := uint(0); ; shift += 7 {
  11852. if shift >= 64 {
  11853. return ErrIntOverflowTypes
  11854. }
  11855. if iNdEx >= l {
  11856. return io.ErrUnexpectedEOF
  11857. }
  11858. b := dAtA[iNdEx]
  11859. iNdEx++
  11860. m.RetainHeight |= int64(b&0x7F) << shift
  11861. if b < 0x80 {
  11862. break
  11863. }
  11864. }
  11865. default:
  11866. iNdEx = preIndex
  11867. skippy, err := skipTypes(dAtA[iNdEx:])
  11868. if err != nil {
  11869. return err
  11870. }
  11871. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11872. return ErrInvalidLengthTypes
  11873. }
  11874. if (iNdEx + skippy) > l {
  11875. return io.ErrUnexpectedEOF
  11876. }
  11877. iNdEx += skippy
  11878. }
  11879. }
  11880. if iNdEx > l {
  11881. return io.ErrUnexpectedEOF
  11882. }
  11883. return nil
  11884. }
  11885. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11886. l := len(dAtA)
  11887. iNdEx := 0
  11888. for iNdEx < l {
  11889. preIndex := iNdEx
  11890. var wire uint64
  11891. for shift := uint(0); ; shift += 7 {
  11892. if shift >= 64 {
  11893. return ErrIntOverflowTypes
  11894. }
  11895. if iNdEx >= l {
  11896. return io.ErrUnexpectedEOF
  11897. }
  11898. b := dAtA[iNdEx]
  11899. iNdEx++
  11900. wire |= uint64(b&0x7F) << shift
  11901. if b < 0x80 {
  11902. break
  11903. }
  11904. }
  11905. fieldNum := int32(wire >> 3)
  11906. wireType := int(wire & 0x7)
  11907. if wireType == 4 {
  11908. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11909. }
  11910. if fieldNum <= 0 {
  11911. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11912. }
  11913. switch fieldNum {
  11914. case 1:
  11915. if wireType != 2 {
  11916. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11917. }
  11918. var msglen int
  11919. for shift := uint(0); ; shift += 7 {
  11920. if shift >= 64 {
  11921. return ErrIntOverflowTypes
  11922. }
  11923. if iNdEx >= l {
  11924. return io.ErrUnexpectedEOF
  11925. }
  11926. b := dAtA[iNdEx]
  11927. iNdEx++
  11928. msglen |= int(b&0x7F) << shift
  11929. if b < 0x80 {
  11930. break
  11931. }
  11932. }
  11933. if msglen < 0 {
  11934. return ErrInvalidLengthTypes
  11935. }
  11936. postIndex := iNdEx + msglen
  11937. if postIndex < 0 {
  11938. return ErrInvalidLengthTypes
  11939. }
  11940. if postIndex > l {
  11941. return io.ErrUnexpectedEOF
  11942. }
  11943. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11944. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11945. return err
  11946. }
  11947. iNdEx = postIndex
  11948. default:
  11949. iNdEx = preIndex
  11950. skippy, err := skipTypes(dAtA[iNdEx:])
  11951. if err != nil {
  11952. return err
  11953. }
  11954. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11955. return ErrInvalidLengthTypes
  11956. }
  11957. if (iNdEx + skippy) > l {
  11958. return io.ErrUnexpectedEOF
  11959. }
  11960. iNdEx += skippy
  11961. }
  11962. }
  11963. if iNdEx > l {
  11964. return io.ErrUnexpectedEOF
  11965. }
  11966. return nil
  11967. }
  11968. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11969. l := len(dAtA)
  11970. iNdEx := 0
  11971. for iNdEx < l {
  11972. preIndex := iNdEx
  11973. var wire uint64
  11974. for shift := uint(0); ; shift += 7 {
  11975. if shift >= 64 {
  11976. return ErrIntOverflowTypes
  11977. }
  11978. if iNdEx >= l {
  11979. return io.ErrUnexpectedEOF
  11980. }
  11981. b := dAtA[iNdEx]
  11982. iNdEx++
  11983. wire |= uint64(b&0x7F) << shift
  11984. if b < 0x80 {
  11985. break
  11986. }
  11987. }
  11988. fieldNum := int32(wire >> 3)
  11989. wireType := int(wire & 0x7)
  11990. if wireType == 4 {
  11991. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11992. }
  11993. if fieldNum <= 0 {
  11994. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11995. }
  11996. switch fieldNum {
  11997. case 1:
  11998. if wireType != 0 {
  11999. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12000. }
  12001. m.Result = 0
  12002. for shift := uint(0); ; shift += 7 {
  12003. if shift >= 64 {
  12004. return ErrIntOverflowTypes
  12005. }
  12006. if iNdEx >= l {
  12007. return io.ErrUnexpectedEOF
  12008. }
  12009. b := dAtA[iNdEx]
  12010. iNdEx++
  12011. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  12012. if b < 0x80 {
  12013. break
  12014. }
  12015. }
  12016. default:
  12017. iNdEx = preIndex
  12018. skippy, err := skipTypes(dAtA[iNdEx:])
  12019. if err != nil {
  12020. return err
  12021. }
  12022. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12023. return ErrInvalidLengthTypes
  12024. }
  12025. if (iNdEx + skippy) > l {
  12026. return io.ErrUnexpectedEOF
  12027. }
  12028. iNdEx += skippy
  12029. }
  12030. }
  12031. if iNdEx > l {
  12032. return io.ErrUnexpectedEOF
  12033. }
  12034. return nil
  12035. }
  12036. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  12037. l := len(dAtA)
  12038. iNdEx := 0
  12039. for iNdEx < l {
  12040. preIndex := iNdEx
  12041. var wire uint64
  12042. for shift := uint(0); ; shift += 7 {
  12043. if shift >= 64 {
  12044. return ErrIntOverflowTypes
  12045. }
  12046. if iNdEx >= l {
  12047. return io.ErrUnexpectedEOF
  12048. }
  12049. b := dAtA[iNdEx]
  12050. iNdEx++
  12051. wire |= uint64(b&0x7F) << shift
  12052. if b < 0x80 {
  12053. break
  12054. }
  12055. }
  12056. fieldNum := int32(wire >> 3)
  12057. wireType := int(wire & 0x7)
  12058. if wireType == 4 {
  12059. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  12060. }
  12061. if fieldNum <= 0 {
  12062. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  12063. }
  12064. switch fieldNum {
  12065. case 1:
  12066. if wireType != 2 {
  12067. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  12068. }
  12069. var byteLen int
  12070. for shift := uint(0); ; shift += 7 {
  12071. if shift >= 64 {
  12072. return ErrIntOverflowTypes
  12073. }
  12074. if iNdEx >= l {
  12075. return io.ErrUnexpectedEOF
  12076. }
  12077. b := dAtA[iNdEx]
  12078. iNdEx++
  12079. byteLen |= int(b&0x7F) << shift
  12080. if b < 0x80 {
  12081. break
  12082. }
  12083. }
  12084. if byteLen < 0 {
  12085. return ErrInvalidLengthTypes
  12086. }
  12087. postIndex := iNdEx + byteLen
  12088. if postIndex < 0 {
  12089. return ErrInvalidLengthTypes
  12090. }
  12091. if postIndex > l {
  12092. return io.ErrUnexpectedEOF
  12093. }
  12094. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  12095. if m.Chunk == nil {
  12096. m.Chunk = []byte{}
  12097. }
  12098. iNdEx = postIndex
  12099. default:
  12100. iNdEx = preIndex
  12101. skippy, err := skipTypes(dAtA[iNdEx:])
  12102. if err != nil {
  12103. return err
  12104. }
  12105. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12106. return ErrInvalidLengthTypes
  12107. }
  12108. if (iNdEx + skippy) > l {
  12109. return io.ErrUnexpectedEOF
  12110. }
  12111. iNdEx += skippy
  12112. }
  12113. }
  12114. if iNdEx > l {
  12115. return io.ErrUnexpectedEOF
  12116. }
  12117. return nil
  12118. }
  12119. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  12120. l := len(dAtA)
  12121. iNdEx := 0
  12122. for iNdEx < l {
  12123. preIndex := iNdEx
  12124. var wire uint64
  12125. for shift := uint(0); ; shift += 7 {
  12126. if shift >= 64 {
  12127. return ErrIntOverflowTypes
  12128. }
  12129. if iNdEx >= l {
  12130. return io.ErrUnexpectedEOF
  12131. }
  12132. b := dAtA[iNdEx]
  12133. iNdEx++
  12134. wire |= uint64(b&0x7F) << shift
  12135. if b < 0x80 {
  12136. break
  12137. }
  12138. }
  12139. fieldNum := int32(wire >> 3)
  12140. wireType := int(wire & 0x7)
  12141. if wireType == 4 {
  12142. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  12143. }
  12144. if fieldNum <= 0 {
  12145. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  12146. }
  12147. switch fieldNum {
  12148. case 1:
  12149. if wireType != 0 {
  12150. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12151. }
  12152. m.Result = 0
  12153. for shift := uint(0); ; shift += 7 {
  12154. if shift >= 64 {
  12155. return ErrIntOverflowTypes
  12156. }
  12157. if iNdEx >= l {
  12158. return io.ErrUnexpectedEOF
  12159. }
  12160. b := dAtA[iNdEx]
  12161. iNdEx++
  12162. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  12163. if b < 0x80 {
  12164. break
  12165. }
  12166. }
  12167. case 2:
  12168. if wireType == 0 {
  12169. var v uint32
  12170. for shift := uint(0); ; shift += 7 {
  12171. if shift >= 64 {
  12172. return ErrIntOverflowTypes
  12173. }
  12174. if iNdEx >= l {
  12175. return io.ErrUnexpectedEOF
  12176. }
  12177. b := dAtA[iNdEx]
  12178. iNdEx++
  12179. v |= uint32(b&0x7F) << shift
  12180. if b < 0x80 {
  12181. break
  12182. }
  12183. }
  12184. m.RefetchChunks = append(m.RefetchChunks, v)
  12185. } else if wireType == 2 {
  12186. var packedLen int
  12187. for shift := uint(0); ; shift += 7 {
  12188. if shift >= 64 {
  12189. return ErrIntOverflowTypes
  12190. }
  12191. if iNdEx >= l {
  12192. return io.ErrUnexpectedEOF
  12193. }
  12194. b := dAtA[iNdEx]
  12195. iNdEx++
  12196. packedLen |= int(b&0x7F) << shift
  12197. if b < 0x80 {
  12198. break
  12199. }
  12200. }
  12201. if packedLen < 0 {
  12202. return ErrInvalidLengthTypes
  12203. }
  12204. postIndex := iNdEx + packedLen
  12205. if postIndex < 0 {
  12206. return ErrInvalidLengthTypes
  12207. }
  12208. if postIndex > l {
  12209. return io.ErrUnexpectedEOF
  12210. }
  12211. var elementCount int
  12212. var count int
  12213. for _, integer := range dAtA[iNdEx:postIndex] {
  12214. if integer < 128 {
  12215. count++
  12216. }
  12217. }
  12218. elementCount = count
  12219. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  12220. m.RefetchChunks = make([]uint32, 0, elementCount)
  12221. }
  12222. for iNdEx < postIndex {
  12223. var v uint32
  12224. for shift := uint(0); ; shift += 7 {
  12225. if shift >= 64 {
  12226. return ErrIntOverflowTypes
  12227. }
  12228. if iNdEx >= l {
  12229. return io.ErrUnexpectedEOF
  12230. }
  12231. b := dAtA[iNdEx]
  12232. iNdEx++
  12233. v |= uint32(b&0x7F) << shift
  12234. if b < 0x80 {
  12235. break
  12236. }
  12237. }
  12238. m.RefetchChunks = append(m.RefetchChunks, v)
  12239. }
  12240. } else {
  12241. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  12242. }
  12243. case 3:
  12244. if wireType != 2 {
  12245. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  12246. }
  12247. var stringLen uint64
  12248. for shift := uint(0); ; shift += 7 {
  12249. if shift >= 64 {
  12250. return ErrIntOverflowTypes
  12251. }
  12252. if iNdEx >= l {
  12253. return io.ErrUnexpectedEOF
  12254. }
  12255. b := dAtA[iNdEx]
  12256. iNdEx++
  12257. stringLen |= uint64(b&0x7F) << shift
  12258. if b < 0x80 {
  12259. break
  12260. }
  12261. }
  12262. intStringLen := int(stringLen)
  12263. if intStringLen < 0 {
  12264. return ErrInvalidLengthTypes
  12265. }
  12266. postIndex := iNdEx + intStringLen
  12267. if postIndex < 0 {
  12268. return ErrInvalidLengthTypes
  12269. }
  12270. if postIndex > l {
  12271. return io.ErrUnexpectedEOF
  12272. }
  12273. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  12274. iNdEx = postIndex
  12275. default:
  12276. iNdEx = preIndex
  12277. skippy, err := skipTypes(dAtA[iNdEx:])
  12278. if err != nil {
  12279. return err
  12280. }
  12281. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12282. return ErrInvalidLengthTypes
  12283. }
  12284. if (iNdEx + skippy) > l {
  12285. return io.ErrUnexpectedEOF
  12286. }
  12287. iNdEx += skippy
  12288. }
  12289. }
  12290. if iNdEx > l {
  12291. return io.ErrUnexpectedEOF
  12292. }
  12293. return nil
  12294. }
  12295. func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
  12296. l := len(dAtA)
  12297. iNdEx := 0
  12298. for iNdEx < l {
  12299. preIndex := iNdEx
  12300. var wire uint64
  12301. for shift := uint(0); ; shift += 7 {
  12302. if shift >= 64 {
  12303. return ErrIntOverflowTypes
  12304. }
  12305. if iNdEx >= l {
  12306. return io.ErrUnexpectedEOF
  12307. }
  12308. b := dAtA[iNdEx]
  12309. iNdEx++
  12310. wire |= uint64(b&0x7F) << shift
  12311. if b < 0x80 {
  12312. break
  12313. }
  12314. }
  12315. fieldNum := int32(wire >> 3)
  12316. wireType := int(wire & 0x7)
  12317. if wireType == 4 {
  12318. return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group")
  12319. }
  12320. if fieldNum <= 0 {
  12321. return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
  12322. }
  12323. switch fieldNum {
  12324. case 1:
  12325. if wireType != 2 {
  12326. return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  12327. }
  12328. var msglen int
  12329. for shift := uint(0); ; shift += 7 {
  12330. if shift >= 64 {
  12331. return ErrIntOverflowTypes
  12332. }
  12333. if iNdEx >= l {
  12334. return io.ErrUnexpectedEOF
  12335. }
  12336. b := dAtA[iNdEx]
  12337. iNdEx++
  12338. msglen |= int(b&0x7F) << shift
  12339. if b < 0x80 {
  12340. break
  12341. }
  12342. }
  12343. if msglen < 0 {
  12344. return ErrInvalidLengthTypes
  12345. }
  12346. postIndex := iNdEx + msglen
  12347. if postIndex < 0 {
  12348. return ErrInvalidLengthTypes
  12349. }
  12350. if postIndex > l {
  12351. return io.ErrUnexpectedEOF
  12352. }
  12353. if m.Block == nil {
  12354. m.Block = &BlockParams{}
  12355. }
  12356. if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12357. return err
  12358. }
  12359. iNdEx = postIndex
  12360. case 2:
  12361. if wireType != 2 {
  12362. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  12363. }
  12364. var msglen int
  12365. for shift := uint(0); ; shift += 7 {
  12366. if shift >= 64 {
  12367. return ErrIntOverflowTypes
  12368. }
  12369. if iNdEx >= l {
  12370. return io.ErrUnexpectedEOF
  12371. }
  12372. b := dAtA[iNdEx]
  12373. iNdEx++
  12374. msglen |= int(b&0x7F) << shift
  12375. if b < 0x80 {
  12376. break
  12377. }
  12378. }
  12379. if msglen < 0 {
  12380. return ErrInvalidLengthTypes
  12381. }
  12382. postIndex := iNdEx + msglen
  12383. if postIndex < 0 {
  12384. return ErrInvalidLengthTypes
  12385. }
  12386. if postIndex > l {
  12387. return io.ErrUnexpectedEOF
  12388. }
  12389. if m.Evidence == nil {
  12390. m.Evidence = &types1.EvidenceParams{}
  12391. }
  12392. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12393. return err
  12394. }
  12395. iNdEx = postIndex
  12396. case 3:
  12397. if wireType != 2 {
  12398. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12399. }
  12400. var msglen int
  12401. for shift := uint(0); ; shift += 7 {
  12402. if shift >= 64 {
  12403. return ErrIntOverflowTypes
  12404. }
  12405. if iNdEx >= l {
  12406. return io.ErrUnexpectedEOF
  12407. }
  12408. b := dAtA[iNdEx]
  12409. iNdEx++
  12410. msglen |= int(b&0x7F) << shift
  12411. if b < 0x80 {
  12412. break
  12413. }
  12414. }
  12415. if msglen < 0 {
  12416. return ErrInvalidLengthTypes
  12417. }
  12418. postIndex := iNdEx + msglen
  12419. if postIndex < 0 {
  12420. return ErrInvalidLengthTypes
  12421. }
  12422. if postIndex > l {
  12423. return io.ErrUnexpectedEOF
  12424. }
  12425. if m.Validator == nil {
  12426. m.Validator = &types1.ValidatorParams{}
  12427. }
  12428. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12429. return err
  12430. }
  12431. iNdEx = postIndex
  12432. case 4:
  12433. if wireType != 2 {
  12434. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  12435. }
  12436. var msglen int
  12437. for shift := uint(0); ; shift += 7 {
  12438. if shift >= 64 {
  12439. return ErrIntOverflowTypes
  12440. }
  12441. if iNdEx >= l {
  12442. return io.ErrUnexpectedEOF
  12443. }
  12444. b := dAtA[iNdEx]
  12445. iNdEx++
  12446. msglen |= int(b&0x7F) << shift
  12447. if b < 0x80 {
  12448. break
  12449. }
  12450. }
  12451. if msglen < 0 {
  12452. return ErrInvalidLengthTypes
  12453. }
  12454. postIndex := iNdEx + msglen
  12455. if postIndex < 0 {
  12456. return ErrInvalidLengthTypes
  12457. }
  12458. if postIndex > l {
  12459. return io.ErrUnexpectedEOF
  12460. }
  12461. if m.Version == nil {
  12462. m.Version = &types1.VersionParams{}
  12463. }
  12464. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12465. return err
  12466. }
  12467. iNdEx = postIndex
  12468. default:
  12469. iNdEx = preIndex
  12470. skippy, err := skipTypes(dAtA[iNdEx:])
  12471. if err != nil {
  12472. return err
  12473. }
  12474. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12475. return ErrInvalidLengthTypes
  12476. }
  12477. if (iNdEx + skippy) > l {
  12478. return io.ErrUnexpectedEOF
  12479. }
  12480. iNdEx += skippy
  12481. }
  12482. }
  12483. if iNdEx > l {
  12484. return io.ErrUnexpectedEOF
  12485. }
  12486. return nil
  12487. }
  12488. func (m *BlockParams) Unmarshal(dAtA []byte) error {
  12489. l := len(dAtA)
  12490. iNdEx := 0
  12491. for iNdEx < l {
  12492. preIndex := iNdEx
  12493. var wire uint64
  12494. for shift := uint(0); ; shift += 7 {
  12495. if shift >= 64 {
  12496. return ErrIntOverflowTypes
  12497. }
  12498. if iNdEx >= l {
  12499. return io.ErrUnexpectedEOF
  12500. }
  12501. b := dAtA[iNdEx]
  12502. iNdEx++
  12503. wire |= uint64(b&0x7F) << shift
  12504. if b < 0x80 {
  12505. break
  12506. }
  12507. }
  12508. fieldNum := int32(wire >> 3)
  12509. wireType := int(wire & 0x7)
  12510. if wireType == 4 {
  12511. return fmt.Errorf("proto: BlockParams: wiretype end group for non-group")
  12512. }
  12513. if fieldNum <= 0 {
  12514. return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
  12515. }
  12516. switch fieldNum {
  12517. case 1:
  12518. if wireType != 0 {
  12519. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  12520. }
  12521. m.MaxBytes = 0
  12522. for shift := uint(0); ; shift += 7 {
  12523. if shift >= 64 {
  12524. return ErrIntOverflowTypes
  12525. }
  12526. if iNdEx >= l {
  12527. return io.ErrUnexpectedEOF
  12528. }
  12529. b := dAtA[iNdEx]
  12530. iNdEx++
  12531. m.MaxBytes |= int64(b&0x7F) << shift
  12532. if b < 0x80 {
  12533. break
  12534. }
  12535. }
  12536. case 2:
  12537. if wireType != 0 {
  12538. return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
  12539. }
  12540. m.MaxGas = 0
  12541. for shift := uint(0); ; shift += 7 {
  12542. if shift >= 64 {
  12543. return ErrIntOverflowTypes
  12544. }
  12545. if iNdEx >= l {
  12546. return io.ErrUnexpectedEOF
  12547. }
  12548. b := dAtA[iNdEx]
  12549. iNdEx++
  12550. m.MaxGas |= int64(b&0x7F) << shift
  12551. if b < 0x80 {
  12552. break
  12553. }
  12554. }
  12555. default:
  12556. iNdEx = preIndex
  12557. skippy, err := skipTypes(dAtA[iNdEx:])
  12558. if err != nil {
  12559. return err
  12560. }
  12561. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12562. return ErrInvalidLengthTypes
  12563. }
  12564. if (iNdEx + skippy) > l {
  12565. return io.ErrUnexpectedEOF
  12566. }
  12567. iNdEx += skippy
  12568. }
  12569. }
  12570. if iNdEx > l {
  12571. return io.ErrUnexpectedEOF
  12572. }
  12573. return nil
  12574. }
  12575. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  12576. l := len(dAtA)
  12577. iNdEx := 0
  12578. for iNdEx < l {
  12579. preIndex := iNdEx
  12580. var wire uint64
  12581. for shift := uint(0); ; shift += 7 {
  12582. if shift >= 64 {
  12583. return ErrIntOverflowTypes
  12584. }
  12585. if iNdEx >= l {
  12586. return io.ErrUnexpectedEOF
  12587. }
  12588. b := dAtA[iNdEx]
  12589. iNdEx++
  12590. wire |= uint64(b&0x7F) << shift
  12591. if b < 0x80 {
  12592. break
  12593. }
  12594. }
  12595. fieldNum := int32(wire >> 3)
  12596. wireType := int(wire & 0x7)
  12597. if wireType == 4 {
  12598. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  12599. }
  12600. if fieldNum <= 0 {
  12601. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12602. }
  12603. switch fieldNum {
  12604. case 1:
  12605. if wireType != 0 {
  12606. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  12607. }
  12608. m.Round = 0
  12609. for shift := uint(0); ; shift += 7 {
  12610. if shift >= 64 {
  12611. return ErrIntOverflowTypes
  12612. }
  12613. if iNdEx >= l {
  12614. return io.ErrUnexpectedEOF
  12615. }
  12616. b := dAtA[iNdEx]
  12617. iNdEx++
  12618. m.Round |= int32(b&0x7F) << shift
  12619. if b < 0x80 {
  12620. break
  12621. }
  12622. }
  12623. case 2:
  12624. if wireType != 2 {
  12625. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  12626. }
  12627. var msglen int
  12628. for shift := uint(0); ; shift += 7 {
  12629. if shift >= 64 {
  12630. return ErrIntOverflowTypes
  12631. }
  12632. if iNdEx >= l {
  12633. return io.ErrUnexpectedEOF
  12634. }
  12635. b := dAtA[iNdEx]
  12636. iNdEx++
  12637. msglen |= int(b&0x7F) << shift
  12638. if b < 0x80 {
  12639. break
  12640. }
  12641. }
  12642. if msglen < 0 {
  12643. return ErrInvalidLengthTypes
  12644. }
  12645. postIndex := iNdEx + msglen
  12646. if postIndex < 0 {
  12647. return ErrInvalidLengthTypes
  12648. }
  12649. if postIndex > l {
  12650. return io.ErrUnexpectedEOF
  12651. }
  12652. m.Votes = append(m.Votes, VoteInfo{})
  12653. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12654. return err
  12655. }
  12656. iNdEx = postIndex
  12657. default:
  12658. iNdEx = preIndex
  12659. skippy, err := skipTypes(dAtA[iNdEx:])
  12660. if err != nil {
  12661. return err
  12662. }
  12663. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12664. return ErrInvalidLengthTypes
  12665. }
  12666. if (iNdEx + skippy) > l {
  12667. return io.ErrUnexpectedEOF
  12668. }
  12669. iNdEx += skippy
  12670. }
  12671. }
  12672. if iNdEx > l {
  12673. return io.ErrUnexpectedEOF
  12674. }
  12675. return nil
  12676. }
  12677. func (m *Event) Unmarshal(dAtA []byte) error {
  12678. l := len(dAtA)
  12679. iNdEx := 0
  12680. for iNdEx < l {
  12681. preIndex := iNdEx
  12682. var wire uint64
  12683. for shift := uint(0); ; shift += 7 {
  12684. if shift >= 64 {
  12685. return ErrIntOverflowTypes
  12686. }
  12687. if iNdEx >= l {
  12688. return io.ErrUnexpectedEOF
  12689. }
  12690. b := dAtA[iNdEx]
  12691. iNdEx++
  12692. wire |= uint64(b&0x7F) << shift
  12693. if b < 0x80 {
  12694. break
  12695. }
  12696. }
  12697. fieldNum := int32(wire >> 3)
  12698. wireType := int(wire & 0x7)
  12699. if wireType == 4 {
  12700. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  12701. }
  12702. if fieldNum <= 0 {
  12703. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  12704. }
  12705. switch fieldNum {
  12706. case 1:
  12707. if wireType != 2 {
  12708. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12709. }
  12710. var stringLen uint64
  12711. for shift := uint(0); ; shift += 7 {
  12712. if shift >= 64 {
  12713. return ErrIntOverflowTypes
  12714. }
  12715. if iNdEx >= l {
  12716. return io.ErrUnexpectedEOF
  12717. }
  12718. b := dAtA[iNdEx]
  12719. iNdEx++
  12720. stringLen |= uint64(b&0x7F) << shift
  12721. if b < 0x80 {
  12722. break
  12723. }
  12724. }
  12725. intStringLen := int(stringLen)
  12726. if intStringLen < 0 {
  12727. return ErrInvalidLengthTypes
  12728. }
  12729. postIndex := iNdEx + intStringLen
  12730. if postIndex < 0 {
  12731. return ErrInvalidLengthTypes
  12732. }
  12733. if postIndex > l {
  12734. return io.ErrUnexpectedEOF
  12735. }
  12736. m.Type = string(dAtA[iNdEx:postIndex])
  12737. iNdEx = postIndex
  12738. case 2:
  12739. if wireType != 2 {
  12740. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  12741. }
  12742. var msglen int
  12743. for shift := uint(0); ; shift += 7 {
  12744. if shift >= 64 {
  12745. return ErrIntOverflowTypes
  12746. }
  12747. if iNdEx >= l {
  12748. return io.ErrUnexpectedEOF
  12749. }
  12750. b := dAtA[iNdEx]
  12751. iNdEx++
  12752. msglen |= int(b&0x7F) << shift
  12753. if b < 0x80 {
  12754. break
  12755. }
  12756. }
  12757. if msglen < 0 {
  12758. return ErrInvalidLengthTypes
  12759. }
  12760. postIndex := iNdEx + msglen
  12761. if postIndex < 0 {
  12762. return ErrInvalidLengthTypes
  12763. }
  12764. if postIndex > l {
  12765. return io.ErrUnexpectedEOF
  12766. }
  12767. m.Attributes = append(m.Attributes, EventAttribute{})
  12768. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12769. return err
  12770. }
  12771. iNdEx = postIndex
  12772. default:
  12773. iNdEx = preIndex
  12774. skippy, err := skipTypes(dAtA[iNdEx:])
  12775. if err != nil {
  12776. return err
  12777. }
  12778. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12779. return ErrInvalidLengthTypes
  12780. }
  12781. if (iNdEx + skippy) > l {
  12782. return io.ErrUnexpectedEOF
  12783. }
  12784. iNdEx += skippy
  12785. }
  12786. }
  12787. if iNdEx > l {
  12788. return io.ErrUnexpectedEOF
  12789. }
  12790. return nil
  12791. }
  12792. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  12793. l := len(dAtA)
  12794. iNdEx := 0
  12795. for iNdEx < l {
  12796. preIndex := iNdEx
  12797. var wire uint64
  12798. for shift := uint(0); ; shift += 7 {
  12799. if shift >= 64 {
  12800. return ErrIntOverflowTypes
  12801. }
  12802. if iNdEx >= l {
  12803. return io.ErrUnexpectedEOF
  12804. }
  12805. b := dAtA[iNdEx]
  12806. iNdEx++
  12807. wire |= uint64(b&0x7F) << shift
  12808. if b < 0x80 {
  12809. break
  12810. }
  12811. }
  12812. fieldNum := int32(wire >> 3)
  12813. wireType := int(wire & 0x7)
  12814. if wireType == 4 {
  12815. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  12816. }
  12817. if fieldNum <= 0 {
  12818. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  12819. }
  12820. switch fieldNum {
  12821. case 1:
  12822. if wireType != 2 {
  12823. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  12824. }
  12825. var byteLen int
  12826. for shift := uint(0); ; shift += 7 {
  12827. if shift >= 64 {
  12828. return ErrIntOverflowTypes
  12829. }
  12830. if iNdEx >= l {
  12831. return io.ErrUnexpectedEOF
  12832. }
  12833. b := dAtA[iNdEx]
  12834. iNdEx++
  12835. byteLen |= int(b&0x7F) << shift
  12836. if b < 0x80 {
  12837. break
  12838. }
  12839. }
  12840. if byteLen < 0 {
  12841. return ErrInvalidLengthTypes
  12842. }
  12843. postIndex := iNdEx + byteLen
  12844. if postIndex < 0 {
  12845. return ErrInvalidLengthTypes
  12846. }
  12847. if postIndex > l {
  12848. return io.ErrUnexpectedEOF
  12849. }
  12850. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  12851. if m.Key == nil {
  12852. m.Key = []byte{}
  12853. }
  12854. iNdEx = postIndex
  12855. case 2:
  12856. if wireType != 2 {
  12857. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  12858. }
  12859. var byteLen int
  12860. for shift := uint(0); ; shift += 7 {
  12861. if shift >= 64 {
  12862. return ErrIntOverflowTypes
  12863. }
  12864. if iNdEx >= l {
  12865. return io.ErrUnexpectedEOF
  12866. }
  12867. b := dAtA[iNdEx]
  12868. iNdEx++
  12869. byteLen |= int(b&0x7F) << shift
  12870. if b < 0x80 {
  12871. break
  12872. }
  12873. }
  12874. if byteLen < 0 {
  12875. return ErrInvalidLengthTypes
  12876. }
  12877. postIndex := iNdEx + byteLen
  12878. if postIndex < 0 {
  12879. return ErrInvalidLengthTypes
  12880. }
  12881. if postIndex > l {
  12882. return io.ErrUnexpectedEOF
  12883. }
  12884. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  12885. if m.Value == nil {
  12886. m.Value = []byte{}
  12887. }
  12888. iNdEx = postIndex
  12889. case 3:
  12890. if wireType != 0 {
  12891. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12892. }
  12893. var v int
  12894. for shift := uint(0); ; shift += 7 {
  12895. if shift >= 64 {
  12896. return ErrIntOverflowTypes
  12897. }
  12898. if iNdEx >= l {
  12899. return io.ErrUnexpectedEOF
  12900. }
  12901. b := dAtA[iNdEx]
  12902. iNdEx++
  12903. v |= int(b&0x7F) << shift
  12904. if b < 0x80 {
  12905. break
  12906. }
  12907. }
  12908. m.Index = bool(v != 0)
  12909. default:
  12910. iNdEx = preIndex
  12911. skippy, err := skipTypes(dAtA[iNdEx:])
  12912. if err != nil {
  12913. return err
  12914. }
  12915. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12916. return ErrInvalidLengthTypes
  12917. }
  12918. if (iNdEx + skippy) > l {
  12919. return io.ErrUnexpectedEOF
  12920. }
  12921. iNdEx += skippy
  12922. }
  12923. }
  12924. if iNdEx > l {
  12925. return io.ErrUnexpectedEOF
  12926. }
  12927. return nil
  12928. }
  12929. func (m *TxResult) Unmarshal(dAtA []byte) error {
  12930. l := len(dAtA)
  12931. iNdEx := 0
  12932. for iNdEx < l {
  12933. preIndex := iNdEx
  12934. var wire uint64
  12935. for shift := uint(0); ; shift += 7 {
  12936. if shift >= 64 {
  12937. return ErrIntOverflowTypes
  12938. }
  12939. if iNdEx >= l {
  12940. return io.ErrUnexpectedEOF
  12941. }
  12942. b := dAtA[iNdEx]
  12943. iNdEx++
  12944. wire |= uint64(b&0x7F) << shift
  12945. if b < 0x80 {
  12946. break
  12947. }
  12948. }
  12949. fieldNum := int32(wire >> 3)
  12950. wireType := int(wire & 0x7)
  12951. if wireType == 4 {
  12952. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  12953. }
  12954. if fieldNum <= 0 {
  12955. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  12956. }
  12957. switch fieldNum {
  12958. case 1:
  12959. if wireType != 0 {
  12960. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12961. }
  12962. m.Height = 0
  12963. for shift := uint(0); ; shift += 7 {
  12964. if shift >= 64 {
  12965. return ErrIntOverflowTypes
  12966. }
  12967. if iNdEx >= l {
  12968. return io.ErrUnexpectedEOF
  12969. }
  12970. b := dAtA[iNdEx]
  12971. iNdEx++
  12972. m.Height |= int64(b&0x7F) << shift
  12973. if b < 0x80 {
  12974. break
  12975. }
  12976. }
  12977. case 2:
  12978. if wireType != 0 {
  12979. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12980. }
  12981. m.Index = 0
  12982. for shift := uint(0); ; shift += 7 {
  12983. if shift >= 64 {
  12984. return ErrIntOverflowTypes
  12985. }
  12986. if iNdEx >= l {
  12987. return io.ErrUnexpectedEOF
  12988. }
  12989. b := dAtA[iNdEx]
  12990. iNdEx++
  12991. m.Index |= uint32(b&0x7F) << shift
  12992. if b < 0x80 {
  12993. break
  12994. }
  12995. }
  12996. case 3:
  12997. if wireType != 2 {
  12998. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  12999. }
  13000. var byteLen int
  13001. for shift := uint(0); ; shift += 7 {
  13002. if shift >= 64 {
  13003. return ErrIntOverflowTypes
  13004. }
  13005. if iNdEx >= l {
  13006. return io.ErrUnexpectedEOF
  13007. }
  13008. b := dAtA[iNdEx]
  13009. iNdEx++
  13010. byteLen |= int(b&0x7F) << shift
  13011. if b < 0x80 {
  13012. break
  13013. }
  13014. }
  13015. if byteLen < 0 {
  13016. return ErrInvalidLengthTypes
  13017. }
  13018. postIndex := iNdEx + byteLen
  13019. if postIndex < 0 {
  13020. return ErrInvalidLengthTypes
  13021. }
  13022. if postIndex > l {
  13023. return io.ErrUnexpectedEOF
  13024. }
  13025. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  13026. if m.Tx == nil {
  13027. m.Tx = []byte{}
  13028. }
  13029. iNdEx = postIndex
  13030. case 4:
  13031. if wireType != 2 {
  13032. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  13033. }
  13034. var msglen int
  13035. for shift := uint(0); ; shift += 7 {
  13036. if shift >= 64 {
  13037. return ErrIntOverflowTypes
  13038. }
  13039. if iNdEx >= l {
  13040. return io.ErrUnexpectedEOF
  13041. }
  13042. b := dAtA[iNdEx]
  13043. iNdEx++
  13044. msglen |= int(b&0x7F) << shift
  13045. if b < 0x80 {
  13046. break
  13047. }
  13048. }
  13049. if msglen < 0 {
  13050. return ErrInvalidLengthTypes
  13051. }
  13052. postIndex := iNdEx + msglen
  13053. if postIndex < 0 {
  13054. return ErrInvalidLengthTypes
  13055. }
  13056. if postIndex > l {
  13057. return io.ErrUnexpectedEOF
  13058. }
  13059. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  13060. return err
  13061. }
  13062. iNdEx = postIndex
  13063. default:
  13064. iNdEx = preIndex
  13065. skippy, err := skipTypes(dAtA[iNdEx:])
  13066. if err != nil {
  13067. return err
  13068. }
  13069. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13070. return ErrInvalidLengthTypes
  13071. }
  13072. if (iNdEx + skippy) > l {
  13073. return io.ErrUnexpectedEOF
  13074. }
  13075. iNdEx += skippy
  13076. }
  13077. }
  13078. if iNdEx > l {
  13079. return io.ErrUnexpectedEOF
  13080. }
  13081. return nil
  13082. }
  13083. func (m *Validator) Unmarshal(dAtA []byte) error {
  13084. l := len(dAtA)
  13085. iNdEx := 0
  13086. for iNdEx < l {
  13087. preIndex := iNdEx
  13088. var wire uint64
  13089. for shift := uint(0); ; shift += 7 {
  13090. if shift >= 64 {
  13091. return ErrIntOverflowTypes
  13092. }
  13093. if iNdEx >= l {
  13094. return io.ErrUnexpectedEOF
  13095. }
  13096. b := dAtA[iNdEx]
  13097. iNdEx++
  13098. wire |= uint64(b&0x7F) << shift
  13099. if b < 0x80 {
  13100. break
  13101. }
  13102. }
  13103. fieldNum := int32(wire >> 3)
  13104. wireType := int(wire & 0x7)
  13105. if wireType == 4 {
  13106. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  13107. }
  13108. if fieldNum <= 0 {
  13109. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  13110. }
  13111. switch fieldNum {
  13112. case 1:
  13113. if wireType != 2 {
  13114. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  13115. }
  13116. var byteLen int
  13117. for shift := uint(0); ; shift += 7 {
  13118. if shift >= 64 {
  13119. return ErrIntOverflowTypes
  13120. }
  13121. if iNdEx >= l {
  13122. return io.ErrUnexpectedEOF
  13123. }
  13124. b := dAtA[iNdEx]
  13125. iNdEx++
  13126. byteLen |= int(b&0x7F) << shift
  13127. if b < 0x80 {
  13128. break
  13129. }
  13130. }
  13131. if byteLen < 0 {
  13132. return ErrInvalidLengthTypes
  13133. }
  13134. postIndex := iNdEx + byteLen
  13135. if postIndex < 0 {
  13136. return ErrInvalidLengthTypes
  13137. }
  13138. if postIndex > l {
  13139. return io.ErrUnexpectedEOF
  13140. }
  13141. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  13142. if m.Address == nil {
  13143. m.Address = []byte{}
  13144. }
  13145. iNdEx = postIndex
  13146. case 3:
  13147. if wireType != 0 {
  13148. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  13149. }
  13150. m.Power = 0
  13151. for shift := uint(0); ; shift += 7 {
  13152. if shift >= 64 {
  13153. return ErrIntOverflowTypes
  13154. }
  13155. if iNdEx >= l {
  13156. return io.ErrUnexpectedEOF
  13157. }
  13158. b := dAtA[iNdEx]
  13159. iNdEx++
  13160. m.Power |= int64(b&0x7F) << shift
  13161. if b < 0x80 {
  13162. break
  13163. }
  13164. }
  13165. default:
  13166. iNdEx = preIndex
  13167. skippy, err := skipTypes(dAtA[iNdEx:])
  13168. if err != nil {
  13169. return err
  13170. }
  13171. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13172. return ErrInvalidLengthTypes
  13173. }
  13174. if (iNdEx + skippy) > l {
  13175. return io.ErrUnexpectedEOF
  13176. }
  13177. iNdEx += skippy
  13178. }
  13179. }
  13180. if iNdEx > l {
  13181. return io.ErrUnexpectedEOF
  13182. }
  13183. return nil
  13184. }
  13185. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  13186. l := len(dAtA)
  13187. iNdEx := 0
  13188. for iNdEx < l {
  13189. preIndex := iNdEx
  13190. var wire uint64
  13191. for shift := uint(0); ; shift += 7 {
  13192. if shift >= 64 {
  13193. return ErrIntOverflowTypes
  13194. }
  13195. if iNdEx >= l {
  13196. return io.ErrUnexpectedEOF
  13197. }
  13198. b := dAtA[iNdEx]
  13199. iNdEx++
  13200. wire |= uint64(b&0x7F) << shift
  13201. if b < 0x80 {
  13202. break
  13203. }
  13204. }
  13205. fieldNum := int32(wire >> 3)
  13206. wireType := int(wire & 0x7)
  13207. if wireType == 4 {
  13208. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  13209. }
  13210. if fieldNum <= 0 {
  13211. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  13212. }
  13213. switch fieldNum {
  13214. case 1:
  13215. if wireType != 2 {
  13216. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  13217. }
  13218. var msglen int
  13219. for shift := uint(0); ; shift += 7 {
  13220. if shift >= 64 {
  13221. return ErrIntOverflowTypes
  13222. }
  13223. if iNdEx >= l {
  13224. return io.ErrUnexpectedEOF
  13225. }
  13226. b := dAtA[iNdEx]
  13227. iNdEx++
  13228. msglen |= int(b&0x7F) << shift
  13229. if b < 0x80 {
  13230. break
  13231. }
  13232. }
  13233. if msglen < 0 {
  13234. return ErrInvalidLengthTypes
  13235. }
  13236. postIndex := iNdEx + msglen
  13237. if postIndex < 0 {
  13238. return ErrInvalidLengthTypes
  13239. }
  13240. if postIndex > l {
  13241. return io.ErrUnexpectedEOF
  13242. }
  13243. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  13244. return err
  13245. }
  13246. iNdEx = postIndex
  13247. case 2:
  13248. if wireType != 0 {
  13249. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  13250. }
  13251. m.Power = 0
  13252. for shift := uint(0); ; shift += 7 {
  13253. if shift >= 64 {
  13254. return ErrIntOverflowTypes
  13255. }
  13256. if iNdEx >= l {
  13257. return io.ErrUnexpectedEOF
  13258. }
  13259. b := dAtA[iNdEx]
  13260. iNdEx++
  13261. m.Power |= int64(b&0x7F) << shift
  13262. if b < 0x80 {
  13263. break
  13264. }
  13265. }
  13266. default:
  13267. iNdEx = preIndex
  13268. skippy, err := skipTypes(dAtA[iNdEx:])
  13269. if err != nil {
  13270. return err
  13271. }
  13272. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13273. return ErrInvalidLengthTypes
  13274. }
  13275. if (iNdEx + skippy) > l {
  13276. return io.ErrUnexpectedEOF
  13277. }
  13278. iNdEx += skippy
  13279. }
  13280. }
  13281. if iNdEx > l {
  13282. return io.ErrUnexpectedEOF
  13283. }
  13284. return nil
  13285. }
  13286. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  13287. l := len(dAtA)
  13288. iNdEx := 0
  13289. for iNdEx < l {
  13290. preIndex := iNdEx
  13291. var wire uint64
  13292. for shift := uint(0); ; shift += 7 {
  13293. if shift >= 64 {
  13294. return ErrIntOverflowTypes
  13295. }
  13296. if iNdEx >= l {
  13297. return io.ErrUnexpectedEOF
  13298. }
  13299. b := dAtA[iNdEx]
  13300. iNdEx++
  13301. wire |= uint64(b&0x7F) << shift
  13302. if b < 0x80 {
  13303. break
  13304. }
  13305. }
  13306. fieldNum := int32(wire >> 3)
  13307. wireType := int(wire & 0x7)
  13308. if wireType == 4 {
  13309. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  13310. }
  13311. if fieldNum <= 0 {
  13312. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  13313. }
  13314. switch fieldNum {
  13315. case 1:
  13316. if wireType != 2 {
  13317. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  13318. }
  13319. var msglen int
  13320. for shift := uint(0); ; shift += 7 {
  13321. if shift >= 64 {
  13322. return ErrIntOverflowTypes
  13323. }
  13324. if iNdEx >= l {
  13325. return io.ErrUnexpectedEOF
  13326. }
  13327. b := dAtA[iNdEx]
  13328. iNdEx++
  13329. msglen |= int(b&0x7F) << shift
  13330. if b < 0x80 {
  13331. break
  13332. }
  13333. }
  13334. if msglen < 0 {
  13335. return ErrInvalidLengthTypes
  13336. }
  13337. postIndex := iNdEx + msglen
  13338. if postIndex < 0 {
  13339. return ErrInvalidLengthTypes
  13340. }
  13341. if postIndex > l {
  13342. return io.ErrUnexpectedEOF
  13343. }
  13344. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  13345. return err
  13346. }
  13347. iNdEx = postIndex
  13348. case 2:
  13349. if wireType != 0 {
  13350. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  13351. }
  13352. var v int
  13353. for shift := uint(0); ; shift += 7 {
  13354. if shift >= 64 {
  13355. return ErrIntOverflowTypes
  13356. }
  13357. if iNdEx >= l {
  13358. return io.ErrUnexpectedEOF
  13359. }
  13360. b := dAtA[iNdEx]
  13361. iNdEx++
  13362. v |= int(b&0x7F) << shift
  13363. if b < 0x80 {
  13364. break
  13365. }
  13366. }
  13367. m.SignedLastBlock = bool(v != 0)
  13368. default:
  13369. iNdEx = preIndex
  13370. skippy, err := skipTypes(dAtA[iNdEx:])
  13371. if err != nil {
  13372. return err
  13373. }
  13374. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13375. return ErrInvalidLengthTypes
  13376. }
  13377. if (iNdEx + skippy) > l {
  13378. return io.ErrUnexpectedEOF
  13379. }
  13380. iNdEx += skippy
  13381. }
  13382. }
  13383. if iNdEx > l {
  13384. return io.ErrUnexpectedEOF
  13385. }
  13386. return nil
  13387. }
  13388. func (m *Evidence) Unmarshal(dAtA []byte) error {
  13389. l := len(dAtA)
  13390. iNdEx := 0
  13391. for iNdEx < l {
  13392. preIndex := iNdEx
  13393. var wire uint64
  13394. for shift := uint(0); ; shift += 7 {
  13395. if shift >= 64 {
  13396. return ErrIntOverflowTypes
  13397. }
  13398. if iNdEx >= l {
  13399. return io.ErrUnexpectedEOF
  13400. }
  13401. b := dAtA[iNdEx]
  13402. iNdEx++
  13403. wire |= uint64(b&0x7F) << shift
  13404. if b < 0x80 {
  13405. break
  13406. }
  13407. }
  13408. fieldNum := int32(wire >> 3)
  13409. wireType := int(wire & 0x7)
  13410. if wireType == 4 {
  13411. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  13412. }
  13413. if fieldNum <= 0 {
  13414. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  13415. }
  13416. switch fieldNum {
  13417. case 1:
  13418. if wireType != 0 {
  13419. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  13420. }
  13421. m.Type = 0
  13422. for shift := uint(0); ; shift += 7 {
  13423. if shift >= 64 {
  13424. return ErrIntOverflowTypes
  13425. }
  13426. if iNdEx >= l {
  13427. return io.ErrUnexpectedEOF
  13428. }
  13429. b := dAtA[iNdEx]
  13430. iNdEx++
  13431. m.Type |= EvidenceType(b&0x7F) << shift
  13432. if b < 0x80 {
  13433. break
  13434. }
  13435. }
  13436. case 2:
  13437. if wireType != 2 {
  13438. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  13439. }
  13440. var msglen int
  13441. for shift := uint(0); ; shift += 7 {
  13442. if shift >= 64 {
  13443. return ErrIntOverflowTypes
  13444. }
  13445. if iNdEx >= l {
  13446. return io.ErrUnexpectedEOF
  13447. }
  13448. b := dAtA[iNdEx]
  13449. iNdEx++
  13450. msglen |= int(b&0x7F) << shift
  13451. if b < 0x80 {
  13452. break
  13453. }
  13454. }
  13455. if msglen < 0 {
  13456. return ErrInvalidLengthTypes
  13457. }
  13458. postIndex := iNdEx + msglen
  13459. if postIndex < 0 {
  13460. return ErrInvalidLengthTypes
  13461. }
  13462. if postIndex > l {
  13463. return io.ErrUnexpectedEOF
  13464. }
  13465. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  13466. return err
  13467. }
  13468. iNdEx = postIndex
  13469. case 3:
  13470. if wireType != 0 {
  13471. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  13472. }
  13473. m.Height = 0
  13474. for shift := uint(0); ; shift += 7 {
  13475. if shift >= 64 {
  13476. return ErrIntOverflowTypes
  13477. }
  13478. if iNdEx >= l {
  13479. return io.ErrUnexpectedEOF
  13480. }
  13481. b := dAtA[iNdEx]
  13482. iNdEx++
  13483. m.Height |= int64(b&0x7F) << shift
  13484. if b < 0x80 {
  13485. break
  13486. }
  13487. }
  13488. case 4:
  13489. if wireType != 2 {
  13490. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  13491. }
  13492. var msglen int
  13493. for shift := uint(0); ; shift += 7 {
  13494. if shift >= 64 {
  13495. return ErrIntOverflowTypes
  13496. }
  13497. if iNdEx >= l {
  13498. return io.ErrUnexpectedEOF
  13499. }
  13500. b := dAtA[iNdEx]
  13501. iNdEx++
  13502. msglen |= int(b&0x7F) << shift
  13503. if b < 0x80 {
  13504. break
  13505. }
  13506. }
  13507. if msglen < 0 {
  13508. return ErrInvalidLengthTypes
  13509. }
  13510. postIndex := iNdEx + msglen
  13511. if postIndex < 0 {
  13512. return ErrInvalidLengthTypes
  13513. }
  13514. if postIndex > l {
  13515. return io.ErrUnexpectedEOF
  13516. }
  13517. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  13518. return err
  13519. }
  13520. iNdEx = postIndex
  13521. case 5:
  13522. if wireType != 0 {
  13523. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  13524. }
  13525. m.TotalVotingPower = 0
  13526. for shift := uint(0); ; shift += 7 {
  13527. if shift >= 64 {
  13528. return ErrIntOverflowTypes
  13529. }
  13530. if iNdEx >= l {
  13531. return io.ErrUnexpectedEOF
  13532. }
  13533. b := dAtA[iNdEx]
  13534. iNdEx++
  13535. m.TotalVotingPower |= int64(b&0x7F) << shift
  13536. if b < 0x80 {
  13537. break
  13538. }
  13539. }
  13540. default:
  13541. iNdEx = preIndex
  13542. skippy, err := skipTypes(dAtA[iNdEx:])
  13543. if err != nil {
  13544. return err
  13545. }
  13546. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13547. return ErrInvalidLengthTypes
  13548. }
  13549. if (iNdEx + skippy) > l {
  13550. return io.ErrUnexpectedEOF
  13551. }
  13552. iNdEx += skippy
  13553. }
  13554. }
  13555. if iNdEx > l {
  13556. return io.ErrUnexpectedEOF
  13557. }
  13558. return nil
  13559. }
  13560. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  13561. l := len(dAtA)
  13562. iNdEx := 0
  13563. for iNdEx < l {
  13564. preIndex := iNdEx
  13565. var wire uint64
  13566. for shift := uint(0); ; shift += 7 {
  13567. if shift >= 64 {
  13568. return ErrIntOverflowTypes
  13569. }
  13570. if iNdEx >= l {
  13571. return io.ErrUnexpectedEOF
  13572. }
  13573. b := dAtA[iNdEx]
  13574. iNdEx++
  13575. wire |= uint64(b&0x7F) << shift
  13576. if b < 0x80 {
  13577. break
  13578. }
  13579. }
  13580. fieldNum := int32(wire >> 3)
  13581. wireType := int(wire & 0x7)
  13582. if wireType == 4 {
  13583. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  13584. }
  13585. if fieldNum <= 0 {
  13586. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  13587. }
  13588. switch fieldNum {
  13589. case 1:
  13590. if wireType != 0 {
  13591. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  13592. }
  13593. m.Height = 0
  13594. for shift := uint(0); ; shift += 7 {
  13595. if shift >= 64 {
  13596. return ErrIntOverflowTypes
  13597. }
  13598. if iNdEx >= l {
  13599. return io.ErrUnexpectedEOF
  13600. }
  13601. b := dAtA[iNdEx]
  13602. iNdEx++
  13603. m.Height |= uint64(b&0x7F) << shift
  13604. if b < 0x80 {
  13605. break
  13606. }
  13607. }
  13608. case 2:
  13609. if wireType != 0 {
  13610. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  13611. }
  13612. m.Format = 0
  13613. for shift := uint(0); ; shift += 7 {
  13614. if shift >= 64 {
  13615. return ErrIntOverflowTypes
  13616. }
  13617. if iNdEx >= l {
  13618. return io.ErrUnexpectedEOF
  13619. }
  13620. b := dAtA[iNdEx]
  13621. iNdEx++
  13622. m.Format |= uint32(b&0x7F) << shift
  13623. if b < 0x80 {
  13624. break
  13625. }
  13626. }
  13627. case 3:
  13628. if wireType != 0 {
  13629. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  13630. }
  13631. m.Chunks = 0
  13632. for shift := uint(0); ; shift += 7 {
  13633. if shift >= 64 {
  13634. return ErrIntOverflowTypes
  13635. }
  13636. if iNdEx >= l {
  13637. return io.ErrUnexpectedEOF
  13638. }
  13639. b := dAtA[iNdEx]
  13640. iNdEx++
  13641. m.Chunks |= uint32(b&0x7F) << shift
  13642. if b < 0x80 {
  13643. break
  13644. }
  13645. }
  13646. case 4:
  13647. if wireType != 2 {
  13648. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  13649. }
  13650. var byteLen int
  13651. for shift := uint(0); ; shift += 7 {
  13652. if shift >= 64 {
  13653. return ErrIntOverflowTypes
  13654. }
  13655. if iNdEx >= l {
  13656. return io.ErrUnexpectedEOF
  13657. }
  13658. b := dAtA[iNdEx]
  13659. iNdEx++
  13660. byteLen |= int(b&0x7F) << shift
  13661. if b < 0x80 {
  13662. break
  13663. }
  13664. }
  13665. if byteLen < 0 {
  13666. return ErrInvalidLengthTypes
  13667. }
  13668. postIndex := iNdEx + byteLen
  13669. if postIndex < 0 {
  13670. return ErrInvalidLengthTypes
  13671. }
  13672. if postIndex > l {
  13673. return io.ErrUnexpectedEOF
  13674. }
  13675. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  13676. if m.Hash == nil {
  13677. m.Hash = []byte{}
  13678. }
  13679. iNdEx = postIndex
  13680. case 5:
  13681. if wireType != 2 {
  13682. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  13683. }
  13684. var byteLen int
  13685. for shift := uint(0); ; shift += 7 {
  13686. if shift >= 64 {
  13687. return ErrIntOverflowTypes
  13688. }
  13689. if iNdEx >= l {
  13690. return io.ErrUnexpectedEOF
  13691. }
  13692. b := dAtA[iNdEx]
  13693. iNdEx++
  13694. byteLen |= int(b&0x7F) << shift
  13695. if b < 0x80 {
  13696. break
  13697. }
  13698. }
  13699. if byteLen < 0 {
  13700. return ErrInvalidLengthTypes
  13701. }
  13702. postIndex := iNdEx + byteLen
  13703. if postIndex < 0 {
  13704. return ErrInvalidLengthTypes
  13705. }
  13706. if postIndex > l {
  13707. return io.ErrUnexpectedEOF
  13708. }
  13709. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  13710. if m.Metadata == nil {
  13711. m.Metadata = []byte{}
  13712. }
  13713. iNdEx = postIndex
  13714. default:
  13715. iNdEx = preIndex
  13716. skippy, err := skipTypes(dAtA[iNdEx:])
  13717. if err != nil {
  13718. return err
  13719. }
  13720. if (skippy < 0) || (iNdEx+skippy) < 0 {
  13721. return ErrInvalidLengthTypes
  13722. }
  13723. if (iNdEx + skippy) > l {
  13724. return io.ErrUnexpectedEOF
  13725. }
  13726. iNdEx += skippy
  13727. }
  13728. }
  13729. if iNdEx > l {
  13730. return io.ErrUnexpectedEOF
  13731. }
  13732. return nil
  13733. }
  13734. func skipTypes(dAtA []byte) (n int, err error) {
  13735. l := len(dAtA)
  13736. iNdEx := 0
  13737. depth := 0
  13738. for iNdEx < l {
  13739. var wire uint64
  13740. for shift := uint(0); ; shift += 7 {
  13741. if shift >= 64 {
  13742. return 0, ErrIntOverflowTypes
  13743. }
  13744. if iNdEx >= l {
  13745. return 0, io.ErrUnexpectedEOF
  13746. }
  13747. b := dAtA[iNdEx]
  13748. iNdEx++
  13749. wire |= (uint64(b) & 0x7F) << shift
  13750. if b < 0x80 {
  13751. break
  13752. }
  13753. }
  13754. wireType := int(wire & 0x7)
  13755. switch wireType {
  13756. case 0:
  13757. for shift := uint(0); ; shift += 7 {
  13758. if shift >= 64 {
  13759. return 0, ErrIntOverflowTypes
  13760. }
  13761. if iNdEx >= l {
  13762. return 0, io.ErrUnexpectedEOF
  13763. }
  13764. iNdEx++
  13765. if dAtA[iNdEx-1] < 0x80 {
  13766. break
  13767. }
  13768. }
  13769. case 1:
  13770. iNdEx += 8
  13771. case 2:
  13772. var length int
  13773. for shift := uint(0); ; shift += 7 {
  13774. if shift >= 64 {
  13775. return 0, ErrIntOverflowTypes
  13776. }
  13777. if iNdEx >= l {
  13778. return 0, io.ErrUnexpectedEOF
  13779. }
  13780. b := dAtA[iNdEx]
  13781. iNdEx++
  13782. length |= (int(b) & 0x7F) << shift
  13783. if b < 0x80 {
  13784. break
  13785. }
  13786. }
  13787. if length < 0 {
  13788. return 0, ErrInvalidLengthTypes
  13789. }
  13790. iNdEx += length
  13791. case 3:
  13792. depth++
  13793. case 4:
  13794. if depth == 0 {
  13795. return 0, ErrUnexpectedEndOfGroupTypes
  13796. }
  13797. depth--
  13798. case 5:
  13799. iNdEx += 4
  13800. default:
  13801. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  13802. }
  13803. if iNdEx < 0 {
  13804. return 0, ErrInvalidLengthTypes
  13805. }
  13806. if depth == 0 {
  13807. return iNdEx, nil
  13808. }
  13809. }
  13810. return 0, io.ErrUnexpectedEOF
  13811. }
  13812. var (
  13813. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  13814. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  13815. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  13816. )