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.

13923 lines
331 KiB

7 years ago
7 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/abci/types.proto
  3. package types
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. _ "github.com/gogo/protobuf/types"
  10. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  11. crypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
  12. types1 "github.com/tendermint/tendermint/proto/tendermint/types"
  13. grpc "google.golang.org/grpc"
  14. codes "google.golang.org/grpc/codes"
  15. status "google.golang.org/grpc/status"
  16. io "io"
  17. math "math"
  18. math_bits "math/bits"
  19. time "time"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. var _ = time.Kitchen
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  31. type CheckTxType int32
  32. const (
  33. CheckTxType_New CheckTxType = 0
  34. CheckTxType_Recheck CheckTxType = 1
  35. )
  36. var CheckTxType_name = map[int32]string{
  37. 0: "NEW",
  38. 1: "RECHECK",
  39. }
  40. var CheckTxType_value = map[string]int32{
  41. "NEW": 0,
  42. "RECHECK": 1,
  43. }
  44. func (x CheckTxType) String() string {
  45. return proto.EnumName(CheckTxType_name, int32(x))
  46. }
  47. func (CheckTxType) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_252557cfdd89a31a, []int{0}
  49. }
  50. type EvidenceType int32
  51. const (
  52. EvidenceType_UNKNOWN EvidenceType = 0
  53. EvidenceType_DUPLICATE_VOTE EvidenceType = 1
  54. EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2
  55. )
  56. var EvidenceType_name = map[int32]string{
  57. 0: "UNKNOWN",
  58. 1: "DUPLICATE_VOTE",
  59. 2: "LIGHT_CLIENT_ATTACK",
  60. }
  61. var EvidenceType_value = map[string]int32{
  62. "UNKNOWN": 0,
  63. "DUPLICATE_VOTE": 1,
  64. "LIGHT_CLIENT_ATTACK": 2,
  65. }
  66. func (x EvidenceType) String() string {
  67. return proto.EnumName(EvidenceType_name, int32(x))
  68. }
  69. func (EvidenceType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_252557cfdd89a31a, []int{1}
  71. }
  72. type ResponseOfferSnapshot_Result int32
  73. const (
  74. ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0
  75. ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1
  76. ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2
  77. ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3
  78. ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4
  79. ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5
  80. )
  81. var ResponseOfferSnapshot_Result_name = map[int32]string{
  82. 0: "UNKNOWN",
  83. 1: "ACCEPT",
  84. 2: "ABORT",
  85. 3: "REJECT",
  86. 4: "REJECT_FORMAT",
  87. 5: "REJECT_SENDER",
  88. }
  89. var ResponseOfferSnapshot_Result_value = map[string]int32{
  90. "UNKNOWN": 0,
  91. "ACCEPT": 1,
  92. "ABORT": 2,
  93. "REJECT": 3,
  94. "REJECT_FORMAT": 4,
  95. "REJECT_SENDER": 5,
  96. }
  97. func (x ResponseOfferSnapshot_Result) String() string {
  98. return proto.EnumName(ResponseOfferSnapshot_Result_name, int32(x))
  99. }
  100. func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) {
  101. return fileDescriptor_252557cfdd89a31a, []int{28, 0}
  102. }
  103. type ResponseApplySnapshotChunk_Result int32
  104. const (
  105. ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0
  106. ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1
  107. ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2
  108. ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3
  109. ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4
  110. ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5
  111. )
  112. var ResponseApplySnapshotChunk_Result_name = map[int32]string{
  113. 0: "UNKNOWN",
  114. 1: "ACCEPT",
  115. 2: "ABORT",
  116. 3: "RETRY",
  117. 4: "RETRY_SNAPSHOT",
  118. 5: "REJECT_SNAPSHOT",
  119. }
  120. var ResponseApplySnapshotChunk_Result_value = map[string]int32{
  121. "UNKNOWN": 0,
  122. "ACCEPT": 1,
  123. "ABORT": 2,
  124. "RETRY": 3,
  125. "RETRY_SNAPSHOT": 4,
  126. "REJECT_SNAPSHOT": 5,
  127. }
  128. func (x ResponseApplySnapshotChunk_Result) String() string {
  129. return proto.EnumName(ResponseApplySnapshotChunk_Result_name, int32(x))
  130. }
  131. func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) {
  132. return fileDescriptor_252557cfdd89a31a, []int{30, 0}
  133. }
  134. type Request struct {
  135. // Types that are valid to be assigned to Value:
  136. // *Request_Echo
  137. // *Request_Flush
  138. // *Request_Info
  139. // *Request_InitChain
  140. // *Request_Query
  141. // *Request_BeginBlock
  142. // *Request_CheckTx
  143. // *Request_DeliverTx
  144. // *Request_EndBlock
  145. // *Request_Commit
  146. // *Request_ListSnapshots
  147. // *Request_OfferSnapshot
  148. // *Request_LoadSnapshotChunk
  149. // *Request_ApplySnapshotChunk
  150. Value isRequest_Value `protobuf_oneof:"value"`
  151. }
  152. func (m *Request) Reset() { *m = Request{} }
  153. func (m *Request) String() string { return proto.CompactTextString(m) }
  154. func (*Request) ProtoMessage() {}
  155. func (*Request) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_252557cfdd89a31a, []int{0}
  157. }
  158. func (m *Request) XXX_Unmarshal(b []byte) error {
  159. return m.Unmarshal(b)
  160. }
  161. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. if deterministic {
  163. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  164. } else {
  165. b = b[:cap(b)]
  166. n, err := m.MarshalToSizedBuffer(b)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return b[:n], nil
  171. }
  172. }
  173. func (m *Request) XXX_Merge(src proto.Message) {
  174. xxx_messageInfo_Request.Merge(m, src)
  175. }
  176. func (m *Request) XXX_Size() int {
  177. return m.Size()
  178. }
  179. func (m *Request) XXX_DiscardUnknown() {
  180. xxx_messageInfo_Request.DiscardUnknown(m)
  181. }
  182. var xxx_messageInfo_Request proto.InternalMessageInfo
  183. type isRequest_Value interface {
  184. isRequest_Value()
  185. MarshalTo([]byte) (int, error)
  186. Size() int
  187. }
  188. type Request_Echo struct {
  189. Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  190. }
  191. type Request_Flush struct {
  192. Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  193. }
  194. type Request_Info struct {
  195. Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"`
  196. }
  197. type Request_InitChain struct {
  198. InitChain *RequestInitChain `protobuf:"bytes,4,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  199. }
  200. type Request_Query struct {
  201. Query *RequestQuery `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
  202. }
  203. type Request_BeginBlock struct {
  204. BeginBlock *RequestBeginBlock `protobuf:"bytes,6,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  205. }
  206. type Request_CheckTx struct {
  207. CheckTx *RequestCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  208. }
  209. type Request_DeliverTx struct {
  210. DeliverTx *RequestDeliverTx `protobuf:"bytes,8,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  211. }
  212. type Request_EndBlock struct {
  213. EndBlock *RequestEndBlock `protobuf:"bytes,9,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  214. }
  215. type Request_Commit struct {
  216. Commit *RequestCommit `protobuf:"bytes,10,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  217. }
  218. type Request_ListSnapshots struct {
  219. ListSnapshots *RequestListSnapshots `protobuf:"bytes,11,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  220. }
  221. type Request_OfferSnapshot struct {
  222. OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,12,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  223. }
  224. type Request_LoadSnapshotChunk struct {
  225. LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,13,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  226. }
  227. type Request_ApplySnapshotChunk struct {
  228. ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,14,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  229. }
  230. func (*Request_Echo) isRequest_Value() {}
  231. func (*Request_Flush) isRequest_Value() {}
  232. func (*Request_Info) isRequest_Value() {}
  233. func (*Request_InitChain) isRequest_Value() {}
  234. func (*Request_Query) isRequest_Value() {}
  235. func (*Request_BeginBlock) isRequest_Value() {}
  236. func (*Request_CheckTx) isRequest_Value() {}
  237. func (*Request_DeliverTx) isRequest_Value() {}
  238. func (*Request_EndBlock) isRequest_Value() {}
  239. func (*Request_Commit) isRequest_Value() {}
  240. func (*Request_ListSnapshots) isRequest_Value() {}
  241. func (*Request_OfferSnapshot) isRequest_Value() {}
  242. func (*Request_LoadSnapshotChunk) isRequest_Value() {}
  243. func (*Request_ApplySnapshotChunk) isRequest_Value() {}
  244. func (m *Request) GetValue() isRequest_Value {
  245. if m != nil {
  246. return m.Value
  247. }
  248. return nil
  249. }
  250. func (m *Request) GetEcho() *RequestEcho {
  251. if x, ok := m.GetValue().(*Request_Echo); ok {
  252. return x.Echo
  253. }
  254. return nil
  255. }
  256. func (m *Request) GetFlush() *RequestFlush {
  257. if x, ok := m.GetValue().(*Request_Flush); ok {
  258. return x.Flush
  259. }
  260. return nil
  261. }
  262. func (m *Request) GetInfo() *RequestInfo {
  263. if x, ok := m.GetValue().(*Request_Info); ok {
  264. return x.Info
  265. }
  266. return nil
  267. }
  268. func (m *Request) GetInitChain() *RequestInitChain {
  269. if x, ok := m.GetValue().(*Request_InitChain); ok {
  270. return x.InitChain
  271. }
  272. return nil
  273. }
  274. func (m *Request) GetQuery() *RequestQuery {
  275. if x, ok := m.GetValue().(*Request_Query); ok {
  276. return x.Query
  277. }
  278. return nil
  279. }
  280. func (m *Request) GetBeginBlock() *RequestBeginBlock {
  281. if x, ok := m.GetValue().(*Request_BeginBlock); ok {
  282. return x.BeginBlock
  283. }
  284. return nil
  285. }
  286. func (m *Request) GetCheckTx() *RequestCheckTx {
  287. if x, ok := m.GetValue().(*Request_CheckTx); ok {
  288. return x.CheckTx
  289. }
  290. return nil
  291. }
  292. func (m *Request) GetDeliverTx() *RequestDeliverTx {
  293. if x, ok := m.GetValue().(*Request_DeliverTx); ok {
  294. return x.DeliverTx
  295. }
  296. return nil
  297. }
  298. func (m *Request) GetEndBlock() *RequestEndBlock {
  299. if x, ok := m.GetValue().(*Request_EndBlock); ok {
  300. return x.EndBlock
  301. }
  302. return nil
  303. }
  304. func (m *Request) GetCommit() *RequestCommit {
  305. if x, ok := m.GetValue().(*Request_Commit); ok {
  306. return x.Commit
  307. }
  308. return nil
  309. }
  310. func (m *Request) GetListSnapshots() *RequestListSnapshots {
  311. if x, ok := m.GetValue().(*Request_ListSnapshots); ok {
  312. return x.ListSnapshots
  313. }
  314. return nil
  315. }
  316. func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot {
  317. if x, ok := m.GetValue().(*Request_OfferSnapshot); ok {
  318. return x.OfferSnapshot
  319. }
  320. return nil
  321. }
  322. func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk {
  323. if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok {
  324. return x.LoadSnapshotChunk
  325. }
  326. return nil
  327. }
  328. func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk {
  329. if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok {
  330. return x.ApplySnapshotChunk
  331. }
  332. return nil
  333. }
  334. // XXX_OneofWrappers is for the internal use of the proto package.
  335. func (*Request) XXX_OneofWrappers() []interface{} {
  336. return []interface{}{
  337. (*Request_Echo)(nil),
  338. (*Request_Flush)(nil),
  339. (*Request_Info)(nil),
  340. (*Request_InitChain)(nil),
  341. (*Request_Query)(nil),
  342. (*Request_BeginBlock)(nil),
  343. (*Request_CheckTx)(nil),
  344. (*Request_DeliverTx)(nil),
  345. (*Request_EndBlock)(nil),
  346. (*Request_Commit)(nil),
  347. (*Request_ListSnapshots)(nil),
  348. (*Request_OfferSnapshot)(nil),
  349. (*Request_LoadSnapshotChunk)(nil),
  350. (*Request_ApplySnapshotChunk)(nil),
  351. }
  352. }
  353. type RequestEcho struct {
  354. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  355. }
  356. func (m *RequestEcho) Reset() { *m = RequestEcho{} }
  357. func (m *RequestEcho) String() string { return proto.CompactTextString(m) }
  358. func (*RequestEcho) ProtoMessage() {}
  359. func (*RequestEcho) Descriptor() ([]byte, []int) {
  360. return fileDescriptor_252557cfdd89a31a, []int{1}
  361. }
  362. func (m *RequestEcho) XXX_Unmarshal(b []byte) error {
  363. return m.Unmarshal(b)
  364. }
  365. func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  366. if deterministic {
  367. return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic)
  368. } else {
  369. b = b[:cap(b)]
  370. n, err := m.MarshalToSizedBuffer(b)
  371. if err != nil {
  372. return nil, err
  373. }
  374. return b[:n], nil
  375. }
  376. }
  377. func (m *RequestEcho) XXX_Merge(src proto.Message) {
  378. xxx_messageInfo_RequestEcho.Merge(m, src)
  379. }
  380. func (m *RequestEcho) XXX_Size() int {
  381. return m.Size()
  382. }
  383. func (m *RequestEcho) XXX_DiscardUnknown() {
  384. xxx_messageInfo_RequestEcho.DiscardUnknown(m)
  385. }
  386. var xxx_messageInfo_RequestEcho proto.InternalMessageInfo
  387. func (m *RequestEcho) GetMessage() string {
  388. if m != nil {
  389. return m.Message
  390. }
  391. return ""
  392. }
  393. type RequestFlush struct {
  394. }
  395. func (m *RequestFlush) Reset() { *m = RequestFlush{} }
  396. func (m *RequestFlush) String() string { return proto.CompactTextString(m) }
  397. func (*RequestFlush) ProtoMessage() {}
  398. func (*RequestFlush) Descriptor() ([]byte, []int) {
  399. return fileDescriptor_252557cfdd89a31a, []int{2}
  400. }
  401. func (m *RequestFlush) XXX_Unmarshal(b []byte) error {
  402. return m.Unmarshal(b)
  403. }
  404. func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  405. if deterministic {
  406. return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic)
  407. } else {
  408. b = b[:cap(b)]
  409. n, err := m.MarshalToSizedBuffer(b)
  410. if err != nil {
  411. return nil, err
  412. }
  413. return b[:n], nil
  414. }
  415. }
  416. func (m *RequestFlush) XXX_Merge(src proto.Message) {
  417. xxx_messageInfo_RequestFlush.Merge(m, src)
  418. }
  419. func (m *RequestFlush) XXX_Size() int {
  420. return m.Size()
  421. }
  422. func (m *RequestFlush) XXX_DiscardUnknown() {
  423. xxx_messageInfo_RequestFlush.DiscardUnknown(m)
  424. }
  425. var xxx_messageInfo_RequestFlush proto.InternalMessageInfo
  426. type RequestInfo struct {
  427. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  428. BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"`
  429. P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"`
  430. AbciVersion string `protobuf:"bytes,4,opt,name=abci_version,json=abciVersion,proto3" json:"abci_version,omitempty"`
  431. }
  432. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  433. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  434. func (*RequestInfo) ProtoMessage() {}
  435. func (*RequestInfo) Descriptor() ([]byte, []int) {
  436. return fileDescriptor_252557cfdd89a31a, []int{3}
  437. }
  438. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  439. return m.Unmarshal(b)
  440. }
  441. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  442. if deterministic {
  443. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  444. } else {
  445. b = b[:cap(b)]
  446. n, err := m.MarshalToSizedBuffer(b)
  447. if err != nil {
  448. return nil, err
  449. }
  450. return b[:n], nil
  451. }
  452. }
  453. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  454. xxx_messageInfo_RequestInfo.Merge(m, src)
  455. }
  456. func (m *RequestInfo) XXX_Size() int {
  457. return m.Size()
  458. }
  459. func (m *RequestInfo) XXX_DiscardUnknown() {
  460. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  461. }
  462. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  463. func (m *RequestInfo) GetVersion() string {
  464. if m != nil {
  465. return m.Version
  466. }
  467. return ""
  468. }
  469. func (m *RequestInfo) GetBlockVersion() uint64 {
  470. if m != nil {
  471. return m.BlockVersion
  472. }
  473. return 0
  474. }
  475. func (m *RequestInfo) GetP2PVersion() uint64 {
  476. if m != nil {
  477. return m.P2PVersion
  478. }
  479. return 0
  480. }
  481. func (m *RequestInfo) GetAbciVersion() string {
  482. if m != nil {
  483. return m.AbciVersion
  484. }
  485. return ""
  486. }
  487. type RequestInitChain struct {
  488. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  489. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  490. ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  491. Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
  492. AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"`
  493. InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
  494. }
  495. func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
  496. func (m *RequestInitChain) String() string { return proto.CompactTextString(m) }
  497. func (*RequestInitChain) ProtoMessage() {}
  498. func (*RequestInitChain) Descriptor() ([]byte, []int) {
  499. return fileDescriptor_252557cfdd89a31a, []int{4}
  500. }
  501. func (m *RequestInitChain) XXX_Unmarshal(b []byte) error {
  502. return m.Unmarshal(b)
  503. }
  504. func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  505. if deterministic {
  506. return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic)
  507. } else {
  508. b = b[:cap(b)]
  509. n, err := m.MarshalToSizedBuffer(b)
  510. if err != nil {
  511. return nil, err
  512. }
  513. return b[:n], nil
  514. }
  515. }
  516. func (m *RequestInitChain) XXX_Merge(src proto.Message) {
  517. xxx_messageInfo_RequestInitChain.Merge(m, src)
  518. }
  519. func (m *RequestInitChain) XXX_Size() int {
  520. return m.Size()
  521. }
  522. func (m *RequestInitChain) XXX_DiscardUnknown() {
  523. xxx_messageInfo_RequestInitChain.DiscardUnknown(m)
  524. }
  525. var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo
  526. func (m *RequestInitChain) GetTime() time.Time {
  527. if m != nil {
  528. return m.Time
  529. }
  530. return time.Time{}
  531. }
  532. func (m *RequestInitChain) GetChainId() string {
  533. if m != nil {
  534. return m.ChainId
  535. }
  536. return ""
  537. }
  538. func (m *RequestInitChain) GetConsensusParams() *ConsensusParams {
  539. if m != nil {
  540. return m.ConsensusParams
  541. }
  542. return nil
  543. }
  544. func (m *RequestInitChain) GetValidators() []ValidatorUpdate {
  545. if m != nil {
  546. return m.Validators
  547. }
  548. return nil
  549. }
  550. func (m *RequestInitChain) GetAppStateBytes() []byte {
  551. if m != nil {
  552. return m.AppStateBytes
  553. }
  554. return nil
  555. }
  556. func (m *RequestInitChain) GetInitialHeight() int64 {
  557. if m != nil {
  558. return m.InitialHeight
  559. }
  560. return 0
  561. }
  562. type RequestQuery struct {
  563. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  564. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  565. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  566. Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"`
  567. }
  568. func (m *RequestQuery) Reset() { *m = RequestQuery{} }
  569. func (m *RequestQuery) String() string { return proto.CompactTextString(m) }
  570. func (*RequestQuery) ProtoMessage() {}
  571. func (*RequestQuery) Descriptor() ([]byte, []int) {
  572. return fileDescriptor_252557cfdd89a31a, []int{5}
  573. }
  574. func (m *RequestQuery) XXX_Unmarshal(b []byte) error {
  575. return m.Unmarshal(b)
  576. }
  577. func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  578. if deterministic {
  579. return xxx_messageInfo_RequestQuery.Marshal(b, m, deterministic)
  580. } else {
  581. b = b[:cap(b)]
  582. n, err := m.MarshalToSizedBuffer(b)
  583. if err != nil {
  584. return nil, err
  585. }
  586. return b[:n], nil
  587. }
  588. }
  589. func (m *RequestQuery) XXX_Merge(src proto.Message) {
  590. xxx_messageInfo_RequestQuery.Merge(m, src)
  591. }
  592. func (m *RequestQuery) XXX_Size() int {
  593. return m.Size()
  594. }
  595. func (m *RequestQuery) XXX_DiscardUnknown() {
  596. xxx_messageInfo_RequestQuery.DiscardUnknown(m)
  597. }
  598. var xxx_messageInfo_RequestQuery proto.InternalMessageInfo
  599. func (m *RequestQuery) GetData() []byte {
  600. if m != nil {
  601. return m.Data
  602. }
  603. return nil
  604. }
  605. func (m *RequestQuery) GetPath() string {
  606. if m != nil {
  607. return m.Path
  608. }
  609. return ""
  610. }
  611. func (m *RequestQuery) GetHeight() int64 {
  612. if m != nil {
  613. return m.Height
  614. }
  615. return 0
  616. }
  617. func (m *RequestQuery) GetProve() bool {
  618. if m != nil {
  619. return m.Prove
  620. }
  621. return false
  622. }
  623. type RequestBeginBlock struct {
  624. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  625. Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"`
  626. LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"`
  627. ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"`
  628. }
  629. func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
  630. func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) }
  631. func (*RequestBeginBlock) ProtoMessage() {}
  632. func (*RequestBeginBlock) Descriptor() ([]byte, []int) {
  633. return fileDescriptor_252557cfdd89a31a, []int{6}
  634. }
  635. func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error {
  636. return m.Unmarshal(b)
  637. }
  638. func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  639. if deterministic {
  640. return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic)
  641. } else {
  642. b = b[:cap(b)]
  643. n, err := m.MarshalToSizedBuffer(b)
  644. if err != nil {
  645. return nil, err
  646. }
  647. return b[:n], nil
  648. }
  649. }
  650. func (m *RequestBeginBlock) XXX_Merge(src proto.Message) {
  651. xxx_messageInfo_RequestBeginBlock.Merge(m, src)
  652. }
  653. func (m *RequestBeginBlock) XXX_Size() int {
  654. return m.Size()
  655. }
  656. func (m *RequestBeginBlock) XXX_DiscardUnknown() {
  657. xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m)
  658. }
  659. var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo
  660. func (m *RequestBeginBlock) GetHash() []byte {
  661. if m != nil {
  662. return m.Hash
  663. }
  664. return nil
  665. }
  666. func (m *RequestBeginBlock) GetHeader() types1.Header {
  667. if m != nil {
  668. return m.Header
  669. }
  670. return types1.Header{}
  671. }
  672. func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo {
  673. if m != nil {
  674. return m.LastCommitInfo
  675. }
  676. return LastCommitInfo{}
  677. }
  678. func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
  679. if m != nil {
  680. return m.ByzantineValidators
  681. }
  682. return nil
  683. }
  684. type RequestCheckTx struct {
  685. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  686. Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"`
  687. }
  688. func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} }
  689. func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) }
  690. func (*RequestCheckTx) ProtoMessage() {}
  691. func (*RequestCheckTx) Descriptor() ([]byte, []int) {
  692. return fileDescriptor_252557cfdd89a31a, []int{7}
  693. }
  694. func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error {
  695. return m.Unmarshal(b)
  696. }
  697. func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  698. if deterministic {
  699. return xxx_messageInfo_RequestCheckTx.Marshal(b, m, deterministic)
  700. } else {
  701. b = b[:cap(b)]
  702. n, err := m.MarshalToSizedBuffer(b)
  703. if err != nil {
  704. return nil, err
  705. }
  706. return b[:n], nil
  707. }
  708. }
  709. func (m *RequestCheckTx) XXX_Merge(src proto.Message) {
  710. xxx_messageInfo_RequestCheckTx.Merge(m, src)
  711. }
  712. func (m *RequestCheckTx) XXX_Size() int {
  713. return m.Size()
  714. }
  715. func (m *RequestCheckTx) XXX_DiscardUnknown() {
  716. xxx_messageInfo_RequestCheckTx.DiscardUnknown(m)
  717. }
  718. var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo
  719. func (m *RequestCheckTx) GetTx() []byte {
  720. if m != nil {
  721. return m.Tx
  722. }
  723. return nil
  724. }
  725. func (m *RequestCheckTx) GetType() CheckTxType {
  726. if m != nil {
  727. return m.Type
  728. }
  729. return CheckTxType_New
  730. }
  731. type RequestDeliverTx struct {
  732. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  733. }
  734. func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
  735. func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
  736. func (*RequestDeliverTx) ProtoMessage() {}
  737. func (*RequestDeliverTx) Descriptor() ([]byte, []int) {
  738. return fileDescriptor_252557cfdd89a31a, []int{8}
  739. }
  740. func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error {
  741. return m.Unmarshal(b)
  742. }
  743. func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  744. if deterministic {
  745. return xxx_messageInfo_RequestDeliverTx.Marshal(b, m, deterministic)
  746. } else {
  747. b = b[:cap(b)]
  748. n, err := m.MarshalToSizedBuffer(b)
  749. if err != nil {
  750. return nil, err
  751. }
  752. return b[:n], nil
  753. }
  754. }
  755. func (m *RequestDeliverTx) XXX_Merge(src proto.Message) {
  756. xxx_messageInfo_RequestDeliverTx.Merge(m, src)
  757. }
  758. func (m *RequestDeliverTx) XXX_Size() int {
  759. return m.Size()
  760. }
  761. func (m *RequestDeliverTx) XXX_DiscardUnknown() {
  762. xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m)
  763. }
  764. var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo
  765. func (m *RequestDeliverTx) GetTx() []byte {
  766. if m != nil {
  767. return m.Tx
  768. }
  769. return nil
  770. }
  771. type RequestEndBlock struct {
  772. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  773. }
  774. func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} }
  775. func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) }
  776. func (*RequestEndBlock) ProtoMessage() {}
  777. func (*RequestEndBlock) Descriptor() ([]byte, []int) {
  778. return fileDescriptor_252557cfdd89a31a, []int{9}
  779. }
  780. func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error {
  781. return m.Unmarshal(b)
  782. }
  783. func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  784. if deterministic {
  785. return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic)
  786. } else {
  787. b = b[:cap(b)]
  788. n, err := m.MarshalToSizedBuffer(b)
  789. if err != nil {
  790. return nil, err
  791. }
  792. return b[:n], nil
  793. }
  794. }
  795. func (m *RequestEndBlock) XXX_Merge(src proto.Message) {
  796. xxx_messageInfo_RequestEndBlock.Merge(m, src)
  797. }
  798. func (m *RequestEndBlock) XXX_Size() int {
  799. return m.Size()
  800. }
  801. func (m *RequestEndBlock) XXX_DiscardUnknown() {
  802. xxx_messageInfo_RequestEndBlock.DiscardUnknown(m)
  803. }
  804. var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo
  805. func (m *RequestEndBlock) GetHeight() int64 {
  806. if m != nil {
  807. return m.Height
  808. }
  809. return 0
  810. }
  811. type RequestCommit struct {
  812. }
  813. func (m *RequestCommit) Reset() { *m = RequestCommit{} }
  814. func (m *RequestCommit) String() string { return proto.CompactTextString(m) }
  815. func (*RequestCommit) ProtoMessage() {}
  816. func (*RequestCommit) Descriptor() ([]byte, []int) {
  817. return fileDescriptor_252557cfdd89a31a, []int{10}
  818. }
  819. func (m *RequestCommit) XXX_Unmarshal(b []byte) error {
  820. return m.Unmarshal(b)
  821. }
  822. func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  823. if deterministic {
  824. return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic)
  825. } else {
  826. b = b[:cap(b)]
  827. n, err := m.MarshalToSizedBuffer(b)
  828. if err != nil {
  829. return nil, err
  830. }
  831. return b[:n], nil
  832. }
  833. }
  834. func (m *RequestCommit) XXX_Merge(src proto.Message) {
  835. xxx_messageInfo_RequestCommit.Merge(m, src)
  836. }
  837. func (m *RequestCommit) XXX_Size() int {
  838. return m.Size()
  839. }
  840. func (m *RequestCommit) XXX_DiscardUnknown() {
  841. xxx_messageInfo_RequestCommit.DiscardUnknown(m)
  842. }
  843. var xxx_messageInfo_RequestCommit proto.InternalMessageInfo
  844. // lists available snapshots
  845. type RequestListSnapshots struct {
  846. }
  847. func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} }
  848. func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) }
  849. func (*RequestListSnapshots) ProtoMessage() {}
  850. func (*RequestListSnapshots) Descriptor() ([]byte, []int) {
  851. return fileDescriptor_252557cfdd89a31a, []int{11}
  852. }
  853. func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error {
  854. return m.Unmarshal(b)
  855. }
  856. func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  857. if deterministic {
  858. return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic)
  859. } else {
  860. b = b[:cap(b)]
  861. n, err := m.MarshalToSizedBuffer(b)
  862. if err != nil {
  863. return nil, err
  864. }
  865. return b[:n], nil
  866. }
  867. }
  868. func (m *RequestListSnapshots) XXX_Merge(src proto.Message) {
  869. xxx_messageInfo_RequestListSnapshots.Merge(m, src)
  870. }
  871. func (m *RequestListSnapshots) XXX_Size() int {
  872. return m.Size()
  873. }
  874. func (m *RequestListSnapshots) XXX_DiscardUnknown() {
  875. xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m)
  876. }
  877. var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo
  878. // offers a snapshot to the application
  879. type RequestOfferSnapshot struct {
  880. Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
  881. AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  882. }
  883. func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} }
  884. func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) }
  885. func (*RequestOfferSnapshot) ProtoMessage() {}
  886. func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) {
  887. return fileDescriptor_252557cfdd89a31a, []int{12}
  888. }
  889. func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error {
  890. return m.Unmarshal(b)
  891. }
  892. func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  893. if deterministic {
  894. return xxx_messageInfo_RequestOfferSnapshot.Marshal(b, m, deterministic)
  895. } else {
  896. b = b[:cap(b)]
  897. n, err := m.MarshalToSizedBuffer(b)
  898. if err != nil {
  899. return nil, err
  900. }
  901. return b[:n], nil
  902. }
  903. }
  904. func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) {
  905. xxx_messageInfo_RequestOfferSnapshot.Merge(m, src)
  906. }
  907. func (m *RequestOfferSnapshot) XXX_Size() int {
  908. return m.Size()
  909. }
  910. func (m *RequestOfferSnapshot) XXX_DiscardUnknown() {
  911. xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m)
  912. }
  913. var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo
  914. func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot {
  915. if m != nil {
  916. return m.Snapshot
  917. }
  918. return nil
  919. }
  920. func (m *RequestOfferSnapshot) GetAppHash() []byte {
  921. if m != nil {
  922. return m.AppHash
  923. }
  924. return nil
  925. }
  926. // loads a snapshot chunk
  927. type RequestLoadSnapshotChunk struct {
  928. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  929. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  930. Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
  931. }
  932. func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} }
  933. func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  934. func (*RequestLoadSnapshotChunk) ProtoMessage() {}
  935. func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  936. return fileDescriptor_252557cfdd89a31a, []int{13}
  937. }
  938. func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  939. return m.Unmarshal(b)
  940. }
  941. func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  942. if deterministic {
  943. return xxx_messageInfo_RequestLoadSnapshotChunk.Marshal(b, m, deterministic)
  944. } else {
  945. b = b[:cap(b)]
  946. n, err := m.MarshalToSizedBuffer(b)
  947. if err != nil {
  948. return nil, err
  949. }
  950. return b[:n], nil
  951. }
  952. }
  953. func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  954. xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src)
  955. }
  956. func (m *RequestLoadSnapshotChunk) XXX_Size() int {
  957. return m.Size()
  958. }
  959. func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() {
  960. xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m)
  961. }
  962. var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo
  963. func (m *RequestLoadSnapshotChunk) GetHeight() uint64 {
  964. if m != nil {
  965. return m.Height
  966. }
  967. return 0
  968. }
  969. func (m *RequestLoadSnapshotChunk) GetFormat() uint32 {
  970. if m != nil {
  971. return m.Format
  972. }
  973. return 0
  974. }
  975. func (m *RequestLoadSnapshotChunk) GetChunk() uint32 {
  976. if m != nil {
  977. return m.Chunk
  978. }
  979. return 0
  980. }
  981. // Applies a snapshot chunk
  982. type RequestApplySnapshotChunk struct {
  983. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
  984. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
  985. Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
  986. }
  987. func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} }
  988. func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  989. func (*RequestApplySnapshotChunk) ProtoMessage() {}
  990. func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) {
  991. return fileDescriptor_252557cfdd89a31a, []int{14}
  992. }
  993. func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  994. return m.Unmarshal(b)
  995. }
  996. func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  997. if deterministic {
  998. return xxx_messageInfo_RequestApplySnapshotChunk.Marshal(b, m, deterministic)
  999. } else {
  1000. b = b[:cap(b)]
  1001. n, err := m.MarshalToSizedBuffer(b)
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. return b[:n], nil
  1006. }
  1007. }
  1008. func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) {
  1009. xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src)
  1010. }
  1011. func (m *RequestApplySnapshotChunk) XXX_Size() int {
  1012. return m.Size()
  1013. }
  1014. func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() {
  1015. xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m)
  1016. }
  1017. var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo
  1018. func (m *RequestApplySnapshotChunk) GetIndex() uint32 {
  1019. if m != nil {
  1020. return m.Index
  1021. }
  1022. return 0
  1023. }
  1024. func (m *RequestApplySnapshotChunk) GetChunk() []byte {
  1025. if m != nil {
  1026. return m.Chunk
  1027. }
  1028. return nil
  1029. }
  1030. func (m *RequestApplySnapshotChunk) GetSender() string {
  1031. if m != nil {
  1032. return m.Sender
  1033. }
  1034. return ""
  1035. }
  1036. type Response struct {
  1037. // Types that are valid to be assigned to Value:
  1038. // *Response_Exception
  1039. // *Response_Echo
  1040. // *Response_Flush
  1041. // *Response_Info
  1042. // *Response_InitChain
  1043. // *Response_Query
  1044. // *Response_BeginBlock
  1045. // *Response_CheckTx
  1046. // *Response_DeliverTx
  1047. // *Response_EndBlock
  1048. // *Response_Commit
  1049. // *Response_ListSnapshots
  1050. // *Response_OfferSnapshot
  1051. // *Response_LoadSnapshotChunk
  1052. // *Response_ApplySnapshotChunk
  1053. Value isResponse_Value `protobuf_oneof:"value"`
  1054. }
  1055. func (m *Response) Reset() { *m = Response{} }
  1056. func (m *Response) String() string { return proto.CompactTextString(m) }
  1057. func (*Response) ProtoMessage() {}
  1058. func (*Response) Descriptor() ([]byte, []int) {
  1059. return fileDescriptor_252557cfdd89a31a, []int{15}
  1060. }
  1061. func (m *Response) XXX_Unmarshal(b []byte) error {
  1062. return m.Unmarshal(b)
  1063. }
  1064. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1065. if deterministic {
  1066. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  1067. } else {
  1068. b = b[:cap(b)]
  1069. n, err := m.MarshalToSizedBuffer(b)
  1070. if err != nil {
  1071. return nil, err
  1072. }
  1073. return b[:n], nil
  1074. }
  1075. }
  1076. func (m *Response) XXX_Merge(src proto.Message) {
  1077. xxx_messageInfo_Response.Merge(m, src)
  1078. }
  1079. func (m *Response) XXX_Size() int {
  1080. return m.Size()
  1081. }
  1082. func (m *Response) XXX_DiscardUnknown() {
  1083. xxx_messageInfo_Response.DiscardUnknown(m)
  1084. }
  1085. var xxx_messageInfo_Response proto.InternalMessageInfo
  1086. type isResponse_Value interface {
  1087. isResponse_Value()
  1088. MarshalTo([]byte) (int, error)
  1089. Size() int
  1090. }
  1091. type Response_Exception struct {
  1092. Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"`
  1093. }
  1094. type Response_Echo struct {
  1095. Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  1096. }
  1097. type Response_Flush struct {
  1098. Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  1099. }
  1100. type Response_Info struct {
  1101. Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"`
  1102. }
  1103. type Response_InitChain struct {
  1104. InitChain *ResponseInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  1105. }
  1106. type Response_Query struct {
  1107. Query *ResponseQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
  1108. }
  1109. type Response_BeginBlock struct {
  1110. BeginBlock *ResponseBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  1111. }
  1112. type Response_CheckTx struct {
  1113. CheckTx *ResponseCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  1114. }
  1115. type Response_DeliverTx struct {
  1116. DeliverTx *ResponseDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  1117. }
  1118. type Response_EndBlock struct {
  1119. EndBlock *ResponseEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  1120. }
  1121. type Response_Commit struct {
  1122. Commit *ResponseCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  1123. }
  1124. type Response_ListSnapshots struct {
  1125. ListSnapshots *ResponseListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  1126. }
  1127. type Response_OfferSnapshot struct {
  1128. OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  1129. }
  1130. type Response_LoadSnapshotChunk struct {
  1131. LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  1132. }
  1133. type Response_ApplySnapshotChunk struct {
  1134. ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  1135. }
  1136. func (*Response_Exception) isResponse_Value() {}
  1137. func (*Response_Echo) isResponse_Value() {}
  1138. func (*Response_Flush) isResponse_Value() {}
  1139. func (*Response_Info) isResponse_Value() {}
  1140. func (*Response_InitChain) isResponse_Value() {}
  1141. func (*Response_Query) isResponse_Value() {}
  1142. func (*Response_BeginBlock) isResponse_Value() {}
  1143. func (*Response_CheckTx) isResponse_Value() {}
  1144. func (*Response_DeliverTx) isResponse_Value() {}
  1145. func (*Response_EndBlock) isResponse_Value() {}
  1146. func (*Response_Commit) isResponse_Value() {}
  1147. func (*Response_ListSnapshots) isResponse_Value() {}
  1148. func (*Response_OfferSnapshot) isResponse_Value() {}
  1149. func (*Response_LoadSnapshotChunk) isResponse_Value() {}
  1150. func (*Response_ApplySnapshotChunk) isResponse_Value() {}
  1151. func (m *Response) GetValue() isResponse_Value {
  1152. if m != nil {
  1153. return m.Value
  1154. }
  1155. return nil
  1156. }
  1157. func (m *Response) GetException() *ResponseException {
  1158. if x, ok := m.GetValue().(*Response_Exception); ok {
  1159. return x.Exception
  1160. }
  1161. return nil
  1162. }
  1163. func (m *Response) GetEcho() *ResponseEcho {
  1164. if x, ok := m.GetValue().(*Response_Echo); ok {
  1165. return x.Echo
  1166. }
  1167. return nil
  1168. }
  1169. func (m *Response) GetFlush() *ResponseFlush {
  1170. if x, ok := m.GetValue().(*Response_Flush); ok {
  1171. return x.Flush
  1172. }
  1173. return nil
  1174. }
  1175. func (m *Response) GetInfo() *ResponseInfo {
  1176. if x, ok := m.GetValue().(*Response_Info); ok {
  1177. return x.Info
  1178. }
  1179. return nil
  1180. }
  1181. func (m *Response) GetInitChain() *ResponseInitChain {
  1182. if x, ok := m.GetValue().(*Response_InitChain); ok {
  1183. return x.InitChain
  1184. }
  1185. return nil
  1186. }
  1187. func (m *Response) GetQuery() *ResponseQuery {
  1188. if x, ok := m.GetValue().(*Response_Query); ok {
  1189. return x.Query
  1190. }
  1191. return nil
  1192. }
  1193. func (m *Response) GetBeginBlock() *ResponseBeginBlock {
  1194. if x, ok := m.GetValue().(*Response_BeginBlock); ok {
  1195. return x.BeginBlock
  1196. }
  1197. return nil
  1198. }
  1199. func (m *Response) GetCheckTx() *ResponseCheckTx {
  1200. if x, ok := m.GetValue().(*Response_CheckTx); ok {
  1201. return x.CheckTx
  1202. }
  1203. return nil
  1204. }
  1205. func (m *Response) GetDeliverTx() *ResponseDeliverTx {
  1206. if x, ok := m.GetValue().(*Response_DeliverTx); ok {
  1207. return x.DeliverTx
  1208. }
  1209. return nil
  1210. }
  1211. func (m *Response) GetEndBlock() *ResponseEndBlock {
  1212. if x, ok := m.GetValue().(*Response_EndBlock); ok {
  1213. return x.EndBlock
  1214. }
  1215. return nil
  1216. }
  1217. func (m *Response) GetCommit() *ResponseCommit {
  1218. if x, ok := m.GetValue().(*Response_Commit); ok {
  1219. return x.Commit
  1220. }
  1221. return nil
  1222. }
  1223. func (m *Response) GetListSnapshots() *ResponseListSnapshots {
  1224. if x, ok := m.GetValue().(*Response_ListSnapshots); ok {
  1225. return x.ListSnapshots
  1226. }
  1227. return nil
  1228. }
  1229. func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot {
  1230. if x, ok := m.GetValue().(*Response_OfferSnapshot); ok {
  1231. return x.OfferSnapshot
  1232. }
  1233. return nil
  1234. }
  1235. func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk {
  1236. if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok {
  1237. return x.LoadSnapshotChunk
  1238. }
  1239. return nil
  1240. }
  1241. func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk {
  1242. if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok {
  1243. return x.ApplySnapshotChunk
  1244. }
  1245. return nil
  1246. }
  1247. // XXX_OneofWrappers is for the internal use of the proto package.
  1248. func (*Response) XXX_OneofWrappers() []interface{} {
  1249. return []interface{}{
  1250. (*Response_Exception)(nil),
  1251. (*Response_Echo)(nil),
  1252. (*Response_Flush)(nil),
  1253. (*Response_Info)(nil),
  1254. (*Response_InitChain)(nil),
  1255. (*Response_Query)(nil),
  1256. (*Response_BeginBlock)(nil),
  1257. (*Response_CheckTx)(nil),
  1258. (*Response_DeliverTx)(nil),
  1259. (*Response_EndBlock)(nil),
  1260. (*Response_Commit)(nil),
  1261. (*Response_ListSnapshots)(nil),
  1262. (*Response_OfferSnapshot)(nil),
  1263. (*Response_LoadSnapshotChunk)(nil),
  1264. (*Response_ApplySnapshotChunk)(nil),
  1265. }
  1266. }
  1267. // nondeterministic
  1268. type ResponseException struct {
  1269. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
  1270. }
  1271. func (m *ResponseException) Reset() { *m = ResponseException{} }
  1272. func (m *ResponseException) String() string { return proto.CompactTextString(m) }
  1273. func (*ResponseException) ProtoMessage() {}
  1274. func (*ResponseException) Descriptor() ([]byte, []int) {
  1275. return fileDescriptor_252557cfdd89a31a, []int{16}
  1276. }
  1277. func (m *ResponseException) XXX_Unmarshal(b []byte) error {
  1278. return m.Unmarshal(b)
  1279. }
  1280. func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1281. if deterministic {
  1282. return xxx_messageInfo_ResponseException.Marshal(b, m, deterministic)
  1283. } else {
  1284. b = b[:cap(b)]
  1285. n, err := m.MarshalToSizedBuffer(b)
  1286. if err != nil {
  1287. return nil, err
  1288. }
  1289. return b[:n], nil
  1290. }
  1291. }
  1292. func (m *ResponseException) XXX_Merge(src proto.Message) {
  1293. xxx_messageInfo_ResponseException.Merge(m, src)
  1294. }
  1295. func (m *ResponseException) XXX_Size() int {
  1296. return m.Size()
  1297. }
  1298. func (m *ResponseException) XXX_DiscardUnknown() {
  1299. xxx_messageInfo_ResponseException.DiscardUnknown(m)
  1300. }
  1301. var xxx_messageInfo_ResponseException proto.InternalMessageInfo
  1302. func (m *ResponseException) GetError() string {
  1303. if m != nil {
  1304. return m.Error
  1305. }
  1306. return ""
  1307. }
  1308. type ResponseEcho struct {
  1309. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  1310. }
  1311. func (m *ResponseEcho) Reset() { *m = ResponseEcho{} }
  1312. func (m *ResponseEcho) String() string { return proto.CompactTextString(m) }
  1313. func (*ResponseEcho) ProtoMessage() {}
  1314. func (*ResponseEcho) Descriptor() ([]byte, []int) {
  1315. return fileDescriptor_252557cfdd89a31a, []int{17}
  1316. }
  1317. func (m *ResponseEcho) XXX_Unmarshal(b []byte) error {
  1318. return m.Unmarshal(b)
  1319. }
  1320. func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1321. if deterministic {
  1322. return xxx_messageInfo_ResponseEcho.Marshal(b, m, deterministic)
  1323. } else {
  1324. b = b[:cap(b)]
  1325. n, err := m.MarshalToSizedBuffer(b)
  1326. if err != nil {
  1327. return nil, err
  1328. }
  1329. return b[:n], nil
  1330. }
  1331. }
  1332. func (m *ResponseEcho) XXX_Merge(src proto.Message) {
  1333. xxx_messageInfo_ResponseEcho.Merge(m, src)
  1334. }
  1335. func (m *ResponseEcho) XXX_Size() int {
  1336. return m.Size()
  1337. }
  1338. func (m *ResponseEcho) XXX_DiscardUnknown() {
  1339. xxx_messageInfo_ResponseEcho.DiscardUnknown(m)
  1340. }
  1341. var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo
  1342. func (m *ResponseEcho) GetMessage() string {
  1343. if m != nil {
  1344. return m.Message
  1345. }
  1346. return ""
  1347. }
  1348. type ResponseFlush struct {
  1349. }
  1350. func (m *ResponseFlush) Reset() { *m = ResponseFlush{} }
  1351. func (m *ResponseFlush) String() string { return proto.CompactTextString(m) }
  1352. func (*ResponseFlush) ProtoMessage() {}
  1353. func (*ResponseFlush) Descriptor() ([]byte, []int) {
  1354. return fileDescriptor_252557cfdd89a31a, []int{18}
  1355. }
  1356. func (m *ResponseFlush) XXX_Unmarshal(b []byte) error {
  1357. return m.Unmarshal(b)
  1358. }
  1359. func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1360. if deterministic {
  1361. return xxx_messageInfo_ResponseFlush.Marshal(b, m, deterministic)
  1362. } else {
  1363. b = b[:cap(b)]
  1364. n, err := m.MarshalToSizedBuffer(b)
  1365. if err != nil {
  1366. return nil, err
  1367. }
  1368. return b[:n], nil
  1369. }
  1370. }
  1371. func (m *ResponseFlush) XXX_Merge(src proto.Message) {
  1372. xxx_messageInfo_ResponseFlush.Merge(m, src)
  1373. }
  1374. func (m *ResponseFlush) XXX_Size() int {
  1375. return m.Size()
  1376. }
  1377. func (m *ResponseFlush) XXX_DiscardUnknown() {
  1378. xxx_messageInfo_ResponseFlush.DiscardUnknown(m)
  1379. }
  1380. var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo
  1381. type ResponseInfo struct {
  1382. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  1383. // this is the software version of the application. TODO: remove?
  1384. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1385. AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  1386. LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  1387. LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"`
  1388. }
  1389. func (m *ResponseInfo) Reset() { *m = ResponseInfo{} }
  1390. func (m *ResponseInfo) String() string { return proto.CompactTextString(m) }
  1391. func (*ResponseInfo) ProtoMessage() {}
  1392. func (*ResponseInfo) Descriptor() ([]byte, []int) {
  1393. return fileDescriptor_252557cfdd89a31a, []int{19}
  1394. }
  1395. func (m *ResponseInfo) XXX_Unmarshal(b []byte) error {
  1396. return m.Unmarshal(b)
  1397. }
  1398. func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1399. if deterministic {
  1400. return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic)
  1401. } else {
  1402. b = b[:cap(b)]
  1403. n, err := m.MarshalToSizedBuffer(b)
  1404. if err != nil {
  1405. return nil, err
  1406. }
  1407. return b[:n], nil
  1408. }
  1409. }
  1410. func (m *ResponseInfo) XXX_Merge(src proto.Message) {
  1411. xxx_messageInfo_ResponseInfo.Merge(m, src)
  1412. }
  1413. func (m *ResponseInfo) XXX_Size() int {
  1414. return m.Size()
  1415. }
  1416. func (m *ResponseInfo) XXX_DiscardUnknown() {
  1417. xxx_messageInfo_ResponseInfo.DiscardUnknown(m)
  1418. }
  1419. var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo
  1420. func (m *ResponseInfo) GetData() string {
  1421. if m != nil {
  1422. return m.Data
  1423. }
  1424. return ""
  1425. }
  1426. func (m *ResponseInfo) GetVersion() string {
  1427. if m != nil {
  1428. return m.Version
  1429. }
  1430. return ""
  1431. }
  1432. func (m *ResponseInfo) GetAppVersion() uint64 {
  1433. if m != nil {
  1434. return m.AppVersion
  1435. }
  1436. return 0
  1437. }
  1438. func (m *ResponseInfo) GetLastBlockHeight() int64 {
  1439. if m != nil {
  1440. return m.LastBlockHeight
  1441. }
  1442. return 0
  1443. }
  1444. func (m *ResponseInfo) GetLastBlockAppHash() []byte {
  1445. if m != nil {
  1446. return m.LastBlockAppHash
  1447. }
  1448. return nil
  1449. }
  1450. type ResponseInitChain struct {
  1451. ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  1452. Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
  1453. AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  1454. }
  1455. func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} }
  1456. func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) }
  1457. func (*ResponseInitChain) ProtoMessage() {}
  1458. func (*ResponseInitChain) Descriptor() ([]byte, []int) {
  1459. return fileDescriptor_252557cfdd89a31a, []int{20}
  1460. }
  1461. func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error {
  1462. return m.Unmarshal(b)
  1463. }
  1464. func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1465. if deterministic {
  1466. return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic)
  1467. } else {
  1468. b = b[:cap(b)]
  1469. n, err := m.MarshalToSizedBuffer(b)
  1470. if err != nil {
  1471. return nil, err
  1472. }
  1473. return b[:n], nil
  1474. }
  1475. }
  1476. func (m *ResponseInitChain) XXX_Merge(src proto.Message) {
  1477. xxx_messageInfo_ResponseInitChain.Merge(m, src)
  1478. }
  1479. func (m *ResponseInitChain) XXX_Size() int {
  1480. return m.Size()
  1481. }
  1482. func (m *ResponseInitChain) XXX_DiscardUnknown() {
  1483. xxx_messageInfo_ResponseInitChain.DiscardUnknown(m)
  1484. }
  1485. var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo
  1486. func (m *ResponseInitChain) GetConsensusParams() *ConsensusParams {
  1487. if m != nil {
  1488. return m.ConsensusParams
  1489. }
  1490. return nil
  1491. }
  1492. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1493. if m != nil {
  1494. return m.Validators
  1495. }
  1496. return nil
  1497. }
  1498. func (m *ResponseInitChain) GetAppHash() []byte {
  1499. if m != nil {
  1500. return m.AppHash
  1501. }
  1502. return nil
  1503. }
  1504. type ResponseQuery struct {
  1505. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1506. // bytes data = 2; // use "value" instead.
  1507. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1508. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1509. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1510. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1511. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1512. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1513. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1514. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1515. }
  1516. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1517. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1518. func (*ResponseQuery) ProtoMessage() {}
  1519. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1520. return fileDescriptor_252557cfdd89a31a, []int{21}
  1521. }
  1522. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1523. return m.Unmarshal(b)
  1524. }
  1525. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1526. if deterministic {
  1527. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1528. } else {
  1529. b = b[:cap(b)]
  1530. n, err := m.MarshalToSizedBuffer(b)
  1531. if err != nil {
  1532. return nil, err
  1533. }
  1534. return b[:n], nil
  1535. }
  1536. }
  1537. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1538. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1539. }
  1540. func (m *ResponseQuery) XXX_Size() int {
  1541. return m.Size()
  1542. }
  1543. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1544. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1545. }
  1546. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1547. func (m *ResponseQuery) GetCode() uint32 {
  1548. if m != nil {
  1549. return m.Code
  1550. }
  1551. return 0
  1552. }
  1553. func (m *ResponseQuery) GetLog() string {
  1554. if m != nil {
  1555. return m.Log
  1556. }
  1557. return ""
  1558. }
  1559. func (m *ResponseQuery) GetInfo() string {
  1560. if m != nil {
  1561. return m.Info
  1562. }
  1563. return ""
  1564. }
  1565. func (m *ResponseQuery) GetIndex() int64 {
  1566. if m != nil {
  1567. return m.Index
  1568. }
  1569. return 0
  1570. }
  1571. func (m *ResponseQuery) GetKey() []byte {
  1572. if m != nil {
  1573. return m.Key
  1574. }
  1575. return nil
  1576. }
  1577. func (m *ResponseQuery) GetValue() []byte {
  1578. if m != nil {
  1579. return m.Value
  1580. }
  1581. return nil
  1582. }
  1583. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1584. if m != nil {
  1585. return m.ProofOps
  1586. }
  1587. return nil
  1588. }
  1589. func (m *ResponseQuery) GetHeight() int64 {
  1590. if m != nil {
  1591. return m.Height
  1592. }
  1593. return 0
  1594. }
  1595. func (m *ResponseQuery) GetCodespace() string {
  1596. if m != nil {
  1597. return m.Codespace
  1598. }
  1599. return ""
  1600. }
  1601. type ResponseBeginBlock struct {
  1602. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1603. }
  1604. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1605. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1606. func (*ResponseBeginBlock) ProtoMessage() {}
  1607. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1608. return fileDescriptor_252557cfdd89a31a, []int{22}
  1609. }
  1610. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1611. return m.Unmarshal(b)
  1612. }
  1613. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1614. if deterministic {
  1615. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1616. } else {
  1617. b = b[:cap(b)]
  1618. n, err := m.MarshalToSizedBuffer(b)
  1619. if err != nil {
  1620. return nil, err
  1621. }
  1622. return b[:n], nil
  1623. }
  1624. }
  1625. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1626. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1627. }
  1628. func (m *ResponseBeginBlock) XXX_Size() int {
  1629. return m.Size()
  1630. }
  1631. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1632. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1633. }
  1634. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1635. func (m *ResponseBeginBlock) GetEvents() []Event {
  1636. if m != nil {
  1637. return m.Events
  1638. }
  1639. return nil
  1640. }
  1641. type ResponseCheckTx struct {
  1642. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1643. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1644. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1645. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1646. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1647. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1648. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1649. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1650. }
  1651. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1652. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1653. func (*ResponseCheckTx) ProtoMessage() {}
  1654. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1655. return fileDescriptor_252557cfdd89a31a, []int{23}
  1656. }
  1657. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1658. return m.Unmarshal(b)
  1659. }
  1660. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1661. if deterministic {
  1662. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1663. } else {
  1664. b = b[:cap(b)]
  1665. n, err := m.MarshalToSizedBuffer(b)
  1666. if err != nil {
  1667. return nil, err
  1668. }
  1669. return b[:n], nil
  1670. }
  1671. }
  1672. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1673. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1674. }
  1675. func (m *ResponseCheckTx) XXX_Size() int {
  1676. return m.Size()
  1677. }
  1678. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1679. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1680. }
  1681. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1682. func (m *ResponseCheckTx) GetCode() uint32 {
  1683. if m != nil {
  1684. return m.Code
  1685. }
  1686. return 0
  1687. }
  1688. func (m *ResponseCheckTx) GetData() []byte {
  1689. if m != nil {
  1690. return m.Data
  1691. }
  1692. return nil
  1693. }
  1694. func (m *ResponseCheckTx) GetLog() string {
  1695. if m != nil {
  1696. return m.Log
  1697. }
  1698. return ""
  1699. }
  1700. func (m *ResponseCheckTx) GetInfo() string {
  1701. if m != nil {
  1702. return m.Info
  1703. }
  1704. return ""
  1705. }
  1706. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1707. if m != nil {
  1708. return m.GasWanted
  1709. }
  1710. return 0
  1711. }
  1712. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1713. if m != nil {
  1714. return m.GasUsed
  1715. }
  1716. return 0
  1717. }
  1718. func (m *ResponseCheckTx) GetEvents() []Event {
  1719. if m != nil {
  1720. return m.Events
  1721. }
  1722. return nil
  1723. }
  1724. func (m *ResponseCheckTx) GetCodespace() string {
  1725. if m != nil {
  1726. return m.Codespace
  1727. }
  1728. return ""
  1729. }
  1730. type ResponseDeliverTx struct {
  1731. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1732. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1733. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1734. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1735. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1736. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1737. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1738. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1739. }
  1740. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1741. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1742. func (*ResponseDeliverTx) ProtoMessage() {}
  1743. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1744. return fileDescriptor_252557cfdd89a31a, []int{24}
  1745. }
  1746. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1747. return m.Unmarshal(b)
  1748. }
  1749. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1750. if deterministic {
  1751. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1752. } else {
  1753. b = b[:cap(b)]
  1754. n, err := m.MarshalToSizedBuffer(b)
  1755. if err != nil {
  1756. return nil, err
  1757. }
  1758. return b[:n], nil
  1759. }
  1760. }
  1761. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1762. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1763. }
  1764. func (m *ResponseDeliverTx) XXX_Size() int {
  1765. return m.Size()
  1766. }
  1767. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1768. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1769. }
  1770. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1771. func (m *ResponseDeliverTx) GetCode() uint32 {
  1772. if m != nil {
  1773. return m.Code
  1774. }
  1775. return 0
  1776. }
  1777. func (m *ResponseDeliverTx) GetData() []byte {
  1778. if m != nil {
  1779. return m.Data
  1780. }
  1781. return nil
  1782. }
  1783. func (m *ResponseDeliverTx) GetLog() string {
  1784. if m != nil {
  1785. return m.Log
  1786. }
  1787. return ""
  1788. }
  1789. func (m *ResponseDeliverTx) GetInfo() string {
  1790. if m != nil {
  1791. return m.Info
  1792. }
  1793. return ""
  1794. }
  1795. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1796. if m != nil {
  1797. return m.GasWanted
  1798. }
  1799. return 0
  1800. }
  1801. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1802. if m != nil {
  1803. return m.GasUsed
  1804. }
  1805. return 0
  1806. }
  1807. func (m *ResponseDeliverTx) GetEvents() []Event {
  1808. if m != nil {
  1809. return m.Events
  1810. }
  1811. return nil
  1812. }
  1813. func (m *ResponseDeliverTx) GetCodespace() string {
  1814. if m != nil {
  1815. return m.Codespace
  1816. }
  1817. return ""
  1818. }
  1819. type ResponseEndBlock struct {
  1820. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1821. ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1822. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1823. }
  1824. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1825. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1826. func (*ResponseEndBlock) ProtoMessage() {}
  1827. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1828. return fileDescriptor_252557cfdd89a31a, []int{25}
  1829. }
  1830. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1831. return m.Unmarshal(b)
  1832. }
  1833. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1834. if deterministic {
  1835. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1836. } else {
  1837. b = b[:cap(b)]
  1838. n, err := m.MarshalToSizedBuffer(b)
  1839. if err != nil {
  1840. return nil, err
  1841. }
  1842. return b[:n], nil
  1843. }
  1844. }
  1845. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1846. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1847. }
  1848. func (m *ResponseEndBlock) XXX_Size() int {
  1849. return m.Size()
  1850. }
  1851. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1852. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1853. }
  1854. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1855. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1856. if m != nil {
  1857. return m.ValidatorUpdates
  1858. }
  1859. return nil
  1860. }
  1861. func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams {
  1862. if m != nil {
  1863. return m.ConsensusParamUpdates
  1864. }
  1865. return nil
  1866. }
  1867. func (m *ResponseEndBlock) GetEvents() []Event {
  1868. if m != nil {
  1869. return m.Events
  1870. }
  1871. return nil
  1872. }
  1873. type ResponseCommit struct {
  1874. // reserve 1
  1875. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1876. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1877. }
  1878. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1879. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1880. func (*ResponseCommit) ProtoMessage() {}
  1881. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1882. return fileDescriptor_252557cfdd89a31a, []int{26}
  1883. }
  1884. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1885. return m.Unmarshal(b)
  1886. }
  1887. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1888. if deterministic {
  1889. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1890. } else {
  1891. b = b[:cap(b)]
  1892. n, err := m.MarshalToSizedBuffer(b)
  1893. if err != nil {
  1894. return nil, err
  1895. }
  1896. return b[:n], nil
  1897. }
  1898. }
  1899. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1900. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1901. }
  1902. func (m *ResponseCommit) XXX_Size() int {
  1903. return m.Size()
  1904. }
  1905. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1906. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1907. }
  1908. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1909. func (m *ResponseCommit) GetData() []byte {
  1910. if m != nil {
  1911. return m.Data
  1912. }
  1913. return nil
  1914. }
  1915. func (m *ResponseCommit) GetRetainHeight() int64 {
  1916. if m != nil {
  1917. return m.RetainHeight
  1918. }
  1919. return 0
  1920. }
  1921. type ResponseListSnapshots struct {
  1922. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1923. }
  1924. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1925. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1926. func (*ResponseListSnapshots) ProtoMessage() {}
  1927. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1928. return fileDescriptor_252557cfdd89a31a, []int{27}
  1929. }
  1930. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1931. return m.Unmarshal(b)
  1932. }
  1933. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1934. if deterministic {
  1935. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1936. } else {
  1937. b = b[:cap(b)]
  1938. n, err := m.MarshalToSizedBuffer(b)
  1939. if err != nil {
  1940. return nil, err
  1941. }
  1942. return b[:n], nil
  1943. }
  1944. }
  1945. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1946. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1947. }
  1948. func (m *ResponseListSnapshots) XXX_Size() int {
  1949. return m.Size()
  1950. }
  1951. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1952. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1953. }
  1954. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1955. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1956. if m != nil {
  1957. return m.Snapshots
  1958. }
  1959. return nil
  1960. }
  1961. type ResponseOfferSnapshot struct {
  1962. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1963. }
  1964. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1965. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1966. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1967. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1968. return fileDescriptor_252557cfdd89a31a, []int{28}
  1969. }
  1970. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1971. return m.Unmarshal(b)
  1972. }
  1973. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1974. if deterministic {
  1975. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1976. } else {
  1977. b = b[:cap(b)]
  1978. n, err := m.MarshalToSizedBuffer(b)
  1979. if err != nil {
  1980. return nil, err
  1981. }
  1982. return b[:n], nil
  1983. }
  1984. }
  1985. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  1986. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  1987. }
  1988. func (m *ResponseOfferSnapshot) XXX_Size() int {
  1989. return m.Size()
  1990. }
  1991. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  1992. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  1993. }
  1994. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  1995. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  1996. if m != nil {
  1997. return m.Result
  1998. }
  1999. return ResponseOfferSnapshot_UNKNOWN
  2000. }
  2001. type ResponseLoadSnapshotChunk struct {
  2002. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2003. }
  2004. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2005. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2006. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2007. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2008. return fileDescriptor_252557cfdd89a31a, []int{29}
  2009. }
  2010. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2011. return m.Unmarshal(b)
  2012. }
  2013. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2014. if deterministic {
  2015. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2016. } else {
  2017. b = b[:cap(b)]
  2018. n, err := m.MarshalToSizedBuffer(b)
  2019. if err != nil {
  2020. return nil, err
  2021. }
  2022. return b[:n], nil
  2023. }
  2024. }
  2025. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2026. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2027. }
  2028. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2029. return m.Size()
  2030. }
  2031. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2032. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2033. }
  2034. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2035. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2036. if m != nil {
  2037. return m.Chunk
  2038. }
  2039. return nil
  2040. }
  2041. type ResponseApplySnapshotChunk struct {
  2042. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2043. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2044. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2045. }
  2046. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2047. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2048. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2049. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2050. return fileDescriptor_252557cfdd89a31a, []int{30}
  2051. }
  2052. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2053. return m.Unmarshal(b)
  2054. }
  2055. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2056. if deterministic {
  2057. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2058. } else {
  2059. b = b[:cap(b)]
  2060. n, err := m.MarshalToSizedBuffer(b)
  2061. if err != nil {
  2062. return nil, err
  2063. }
  2064. return b[:n], nil
  2065. }
  2066. }
  2067. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2068. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2069. }
  2070. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2071. return m.Size()
  2072. }
  2073. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2074. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2075. }
  2076. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2077. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2078. if m != nil {
  2079. return m.Result
  2080. }
  2081. return ResponseApplySnapshotChunk_UNKNOWN
  2082. }
  2083. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2084. if m != nil {
  2085. return m.RefetchChunks
  2086. }
  2087. return nil
  2088. }
  2089. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2090. if m != nil {
  2091. return m.RejectSenders
  2092. }
  2093. return nil
  2094. }
  2095. // ConsensusParams contains all consensus-relevant parameters
  2096. // that can be adjusted by the abci app
  2097. type ConsensusParams struct {
  2098. Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
  2099. Evidence *types1.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
  2100. Validator *types1.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"`
  2101. Version *types1.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  2102. }
  2103. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  2104. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  2105. func (*ConsensusParams) ProtoMessage() {}
  2106. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  2107. return fileDescriptor_252557cfdd89a31a, []int{31}
  2108. }
  2109. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  2110. return m.Unmarshal(b)
  2111. }
  2112. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2113. if deterministic {
  2114. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  2115. } else {
  2116. b = b[:cap(b)]
  2117. n, err := m.MarshalToSizedBuffer(b)
  2118. if err != nil {
  2119. return nil, err
  2120. }
  2121. return b[:n], nil
  2122. }
  2123. }
  2124. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  2125. xxx_messageInfo_ConsensusParams.Merge(m, src)
  2126. }
  2127. func (m *ConsensusParams) XXX_Size() int {
  2128. return m.Size()
  2129. }
  2130. func (m *ConsensusParams) XXX_DiscardUnknown() {
  2131. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  2132. }
  2133. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  2134. func (m *ConsensusParams) GetBlock() *BlockParams {
  2135. if m != nil {
  2136. return m.Block
  2137. }
  2138. return nil
  2139. }
  2140. func (m *ConsensusParams) GetEvidence() *types1.EvidenceParams {
  2141. if m != nil {
  2142. return m.Evidence
  2143. }
  2144. return nil
  2145. }
  2146. func (m *ConsensusParams) GetValidator() *types1.ValidatorParams {
  2147. if m != nil {
  2148. return m.Validator
  2149. }
  2150. return nil
  2151. }
  2152. func (m *ConsensusParams) GetVersion() *types1.VersionParams {
  2153. if m != nil {
  2154. return m.Version
  2155. }
  2156. return nil
  2157. }
  2158. // BlockParams contains limits on the block size.
  2159. type BlockParams struct {
  2160. // Note: must be greater than 0
  2161. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  2162. // Note: must be greater or equal to -1
  2163. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  2164. }
  2165. func (m *BlockParams) Reset() { *m = BlockParams{} }
  2166. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  2167. func (*BlockParams) ProtoMessage() {}
  2168. func (*BlockParams) Descriptor() ([]byte, []int) {
  2169. return fileDescriptor_252557cfdd89a31a, []int{32}
  2170. }
  2171. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  2172. return m.Unmarshal(b)
  2173. }
  2174. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2175. if deterministic {
  2176. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  2177. } else {
  2178. b = b[:cap(b)]
  2179. n, err := m.MarshalToSizedBuffer(b)
  2180. if err != nil {
  2181. return nil, err
  2182. }
  2183. return b[:n], nil
  2184. }
  2185. }
  2186. func (m *BlockParams) XXX_Merge(src proto.Message) {
  2187. xxx_messageInfo_BlockParams.Merge(m, src)
  2188. }
  2189. func (m *BlockParams) XXX_Size() int {
  2190. return m.Size()
  2191. }
  2192. func (m *BlockParams) XXX_DiscardUnknown() {
  2193. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  2194. }
  2195. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  2196. func (m *BlockParams) GetMaxBytes() int64 {
  2197. if m != nil {
  2198. return m.MaxBytes
  2199. }
  2200. return 0
  2201. }
  2202. func (m *BlockParams) GetMaxGas() int64 {
  2203. if m != nil {
  2204. return m.MaxGas
  2205. }
  2206. return 0
  2207. }
  2208. type LastCommitInfo struct {
  2209. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2210. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2211. }
  2212. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2213. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2214. func (*LastCommitInfo) ProtoMessage() {}
  2215. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2216. return fileDescriptor_252557cfdd89a31a, []int{33}
  2217. }
  2218. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2219. return m.Unmarshal(b)
  2220. }
  2221. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2222. if deterministic {
  2223. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2224. } else {
  2225. b = b[:cap(b)]
  2226. n, err := m.MarshalToSizedBuffer(b)
  2227. if err != nil {
  2228. return nil, err
  2229. }
  2230. return b[:n], nil
  2231. }
  2232. }
  2233. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2234. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2235. }
  2236. func (m *LastCommitInfo) XXX_Size() int {
  2237. return m.Size()
  2238. }
  2239. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2240. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2241. }
  2242. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2243. func (m *LastCommitInfo) GetRound() int32 {
  2244. if m != nil {
  2245. return m.Round
  2246. }
  2247. return 0
  2248. }
  2249. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2250. if m != nil {
  2251. return m.Votes
  2252. }
  2253. return nil
  2254. }
  2255. // Event allows application developers to attach additional information to
  2256. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2257. // Later, transactions may be queried using these events.
  2258. type Event struct {
  2259. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2260. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2261. }
  2262. func (m *Event) Reset() { *m = Event{} }
  2263. func (m *Event) String() string { return proto.CompactTextString(m) }
  2264. func (*Event) ProtoMessage() {}
  2265. func (*Event) Descriptor() ([]byte, []int) {
  2266. return fileDescriptor_252557cfdd89a31a, []int{34}
  2267. }
  2268. func (m *Event) XXX_Unmarshal(b []byte) error {
  2269. return m.Unmarshal(b)
  2270. }
  2271. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2272. if deterministic {
  2273. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2274. } else {
  2275. b = b[:cap(b)]
  2276. n, err := m.MarshalToSizedBuffer(b)
  2277. if err != nil {
  2278. return nil, err
  2279. }
  2280. return b[:n], nil
  2281. }
  2282. }
  2283. func (m *Event) XXX_Merge(src proto.Message) {
  2284. xxx_messageInfo_Event.Merge(m, src)
  2285. }
  2286. func (m *Event) XXX_Size() int {
  2287. return m.Size()
  2288. }
  2289. func (m *Event) XXX_DiscardUnknown() {
  2290. xxx_messageInfo_Event.DiscardUnknown(m)
  2291. }
  2292. var xxx_messageInfo_Event proto.InternalMessageInfo
  2293. func (m *Event) GetType() string {
  2294. if m != nil {
  2295. return m.Type
  2296. }
  2297. return ""
  2298. }
  2299. func (m *Event) GetAttributes() []EventAttribute {
  2300. if m != nil {
  2301. return m.Attributes
  2302. }
  2303. return nil
  2304. }
  2305. // EventAttribute is a single key-value pair, associated with an event.
  2306. type EventAttribute struct {
  2307. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2308. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2309. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2310. }
  2311. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2312. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2313. func (*EventAttribute) ProtoMessage() {}
  2314. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2315. return fileDescriptor_252557cfdd89a31a, []int{35}
  2316. }
  2317. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2318. return m.Unmarshal(b)
  2319. }
  2320. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2321. if deterministic {
  2322. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2323. } else {
  2324. b = b[:cap(b)]
  2325. n, err := m.MarshalToSizedBuffer(b)
  2326. if err != nil {
  2327. return nil, err
  2328. }
  2329. return b[:n], nil
  2330. }
  2331. }
  2332. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2333. xxx_messageInfo_EventAttribute.Merge(m, src)
  2334. }
  2335. func (m *EventAttribute) XXX_Size() int {
  2336. return m.Size()
  2337. }
  2338. func (m *EventAttribute) XXX_DiscardUnknown() {
  2339. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2340. }
  2341. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2342. func (m *EventAttribute) GetKey() []byte {
  2343. if m != nil {
  2344. return m.Key
  2345. }
  2346. return nil
  2347. }
  2348. func (m *EventAttribute) GetValue() []byte {
  2349. if m != nil {
  2350. return m.Value
  2351. }
  2352. return nil
  2353. }
  2354. func (m *EventAttribute) GetIndex() bool {
  2355. if m != nil {
  2356. return m.Index
  2357. }
  2358. return false
  2359. }
  2360. // TxResult contains results of executing the transaction.
  2361. //
  2362. // One usage is indexing transaction results.
  2363. type TxResult struct {
  2364. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2365. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2366. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2367. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2368. }
  2369. func (m *TxResult) Reset() { *m = TxResult{} }
  2370. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2371. func (*TxResult) ProtoMessage() {}
  2372. func (*TxResult) Descriptor() ([]byte, []int) {
  2373. return fileDescriptor_252557cfdd89a31a, []int{36}
  2374. }
  2375. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2376. return m.Unmarshal(b)
  2377. }
  2378. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2379. if deterministic {
  2380. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2381. } else {
  2382. b = b[:cap(b)]
  2383. n, err := m.MarshalToSizedBuffer(b)
  2384. if err != nil {
  2385. return nil, err
  2386. }
  2387. return b[:n], nil
  2388. }
  2389. }
  2390. func (m *TxResult) XXX_Merge(src proto.Message) {
  2391. xxx_messageInfo_TxResult.Merge(m, src)
  2392. }
  2393. func (m *TxResult) XXX_Size() int {
  2394. return m.Size()
  2395. }
  2396. func (m *TxResult) XXX_DiscardUnknown() {
  2397. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2398. }
  2399. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2400. func (m *TxResult) GetHeight() int64 {
  2401. if m != nil {
  2402. return m.Height
  2403. }
  2404. return 0
  2405. }
  2406. func (m *TxResult) GetIndex() uint32 {
  2407. if m != nil {
  2408. return m.Index
  2409. }
  2410. return 0
  2411. }
  2412. func (m *TxResult) GetTx() []byte {
  2413. if m != nil {
  2414. return m.Tx
  2415. }
  2416. return nil
  2417. }
  2418. func (m *TxResult) GetResult() ResponseDeliverTx {
  2419. if m != nil {
  2420. return m.Result
  2421. }
  2422. return ResponseDeliverTx{}
  2423. }
  2424. // Validator
  2425. type Validator struct {
  2426. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2427. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2428. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2429. }
  2430. func (m *Validator) Reset() { *m = Validator{} }
  2431. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2432. func (*Validator) ProtoMessage() {}
  2433. func (*Validator) Descriptor() ([]byte, []int) {
  2434. return fileDescriptor_252557cfdd89a31a, []int{37}
  2435. }
  2436. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2437. return m.Unmarshal(b)
  2438. }
  2439. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2440. if deterministic {
  2441. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2442. } else {
  2443. b = b[:cap(b)]
  2444. n, err := m.MarshalToSizedBuffer(b)
  2445. if err != nil {
  2446. return nil, err
  2447. }
  2448. return b[:n], nil
  2449. }
  2450. }
  2451. func (m *Validator) XXX_Merge(src proto.Message) {
  2452. xxx_messageInfo_Validator.Merge(m, src)
  2453. }
  2454. func (m *Validator) XXX_Size() int {
  2455. return m.Size()
  2456. }
  2457. func (m *Validator) XXX_DiscardUnknown() {
  2458. xxx_messageInfo_Validator.DiscardUnknown(m)
  2459. }
  2460. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2461. func (m *Validator) GetAddress() []byte {
  2462. if m != nil {
  2463. return m.Address
  2464. }
  2465. return nil
  2466. }
  2467. func (m *Validator) GetPower() int64 {
  2468. if m != nil {
  2469. return m.Power
  2470. }
  2471. return 0
  2472. }
  2473. // ValidatorUpdate
  2474. type ValidatorUpdate struct {
  2475. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2476. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2477. }
  2478. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2479. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2480. func (*ValidatorUpdate) ProtoMessage() {}
  2481. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2482. return fileDescriptor_252557cfdd89a31a, []int{38}
  2483. }
  2484. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2485. return m.Unmarshal(b)
  2486. }
  2487. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2488. if deterministic {
  2489. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2490. } else {
  2491. b = b[:cap(b)]
  2492. n, err := m.MarshalToSizedBuffer(b)
  2493. if err != nil {
  2494. return nil, err
  2495. }
  2496. return b[:n], nil
  2497. }
  2498. }
  2499. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2500. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2501. }
  2502. func (m *ValidatorUpdate) XXX_Size() int {
  2503. return m.Size()
  2504. }
  2505. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2506. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2507. }
  2508. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2509. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2510. if m != nil {
  2511. return m.PubKey
  2512. }
  2513. return crypto.PublicKey{}
  2514. }
  2515. func (m *ValidatorUpdate) GetPower() int64 {
  2516. if m != nil {
  2517. return m.Power
  2518. }
  2519. return 0
  2520. }
  2521. // VoteInfo
  2522. type VoteInfo struct {
  2523. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2524. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2525. }
  2526. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2527. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2528. func (*VoteInfo) ProtoMessage() {}
  2529. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2530. return fileDescriptor_252557cfdd89a31a, []int{39}
  2531. }
  2532. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2533. return m.Unmarshal(b)
  2534. }
  2535. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2536. if deterministic {
  2537. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2538. } else {
  2539. b = b[:cap(b)]
  2540. n, err := m.MarshalToSizedBuffer(b)
  2541. if err != nil {
  2542. return nil, err
  2543. }
  2544. return b[:n], nil
  2545. }
  2546. }
  2547. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2548. xxx_messageInfo_VoteInfo.Merge(m, src)
  2549. }
  2550. func (m *VoteInfo) XXX_Size() int {
  2551. return m.Size()
  2552. }
  2553. func (m *VoteInfo) XXX_DiscardUnknown() {
  2554. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2555. }
  2556. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2557. func (m *VoteInfo) GetValidator() Validator {
  2558. if m != nil {
  2559. return m.Validator
  2560. }
  2561. return Validator{}
  2562. }
  2563. func (m *VoteInfo) GetSignedLastBlock() bool {
  2564. if m != nil {
  2565. return m.SignedLastBlock
  2566. }
  2567. return false
  2568. }
  2569. type Evidence struct {
  2570. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2571. // The offending validator
  2572. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2573. // The height when the offense occurred
  2574. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2575. // The corresponding time where the offense occurred
  2576. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2577. // Total voting power of the validator set in case the ABCI application does
  2578. // not store historical validators.
  2579. // https://github.com/tendermint/tendermint/issues/4581
  2580. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2581. }
  2582. func (m *Evidence) Reset() { *m = Evidence{} }
  2583. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2584. func (*Evidence) ProtoMessage() {}
  2585. func (*Evidence) Descriptor() ([]byte, []int) {
  2586. return fileDescriptor_252557cfdd89a31a, []int{40}
  2587. }
  2588. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2589. return m.Unmarshal(b)
  2590. }
  2591. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2592. if deterministic {
  2593. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2594. } else {
  2595. b = b[:cap(b)]
  2596. n, err := m.MarshalToSizedBuffer(b)
  2597. if err != nil {
  2598. return nil, err
  2599. }
  2600. return b[:n], nil
  2601. }
  2602. }
  2603. func (m *Evidence) XXX_Merge(src proto.Message) {
  2604. xxx_messageInfo_Evidence.Merge(m, src)
  2605. }
  2606. func (m *Evidence) XXX_Size() int {
  2607. return m.Size()
  2608. }
  2609. func (m *Evidence) XXX_DiscardUnknown() {
  2610. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2611. }
  2612. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2613. func (m *Evidence) GetType() EvidenceType {
  2614. if m != nil {
  2615. return m.Type
  2616. }
  2617. return EvidenceType_UNKNOWN
  2618. }
  2619. func (m *Evidence) GetValidator() Validator {
  2620. if m != nil {
  2621. return m.Validator
  2622. }
  2623. return Validator{}
  2624. }
  2625. func (m *Evidence) GetHeight() int64 {
  2626. if m != nil {
  2627. return m.Height
  2628. }
  2629. return 0
  2630. }
  2631. func (m *Evidence) GetTime() time.Time {
  2632. if m != nil {
  2633. return m.Time
  2634. }
  2635. return time.Time{}
  2636. }
  2637. func (m *Evidence) GetTotalVotingPower() int64 {
  2638. if m != nil {
  2639. return m.TotalVotingPower
  2640. }
  2641. return 0
  2642. }
  2643. type Snapshot struct {
  2644. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2645. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2646. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2647. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2648. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2649. }
  2650. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2651. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2652. func (*Snapshot) ProtoMessage() {}
  2653. func (*Snapshot) Descriptor() ([]byte, []int) {
  2654. return fileDescriptor_252557cfdd89a31a, []int{41}
  2655. }
  2656. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2657. return m.Unmarshal(b)
  2658. }
  2659. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2660. if deterministic {
  2661. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2662. } else {
  2663. b = b[:cap(b)]
  2664. n, err := m.MarshalToSizedBuffer(b)
  2665. if err != nil {
  2666. return nil, err
  2667. }
  2668. return b[:n], nil
  2669. }
  2670. }
  2671. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2672. xxx_messageInfo_Snapshot.Merge(m, src)
  2673. }
  2674. func (m *Snapshot) XXX_Size() int {
  2675. return m.Size()
  2676. }
  2677. func (m *Snapshot) XXX_DiscardUnknown() {
  2678. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2679. }
  2680. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2681. func (m *Snapshot) GetHeight() uint64 {
  2682. if m != nil {
  2683. return m.Height
  2684. }
  2685. return 0
  2686. }
  2687. func (m *Snapshot) GetFormat() uint32 {
  2688. if m != nil {
  2689. return m.Format
  2690. }
  2691. return 0
  2692. }
  2693. func (m *Snapshot) GetChunks() uint32 {
  2694. if m != nil {
  2695. return m.Chunks
  2696. }
  2697. return 0
  2698. }
  2699. func (m *Snapshot) GetHash() []byte {
  2700. if m != nil {
  2701. return m.Hash
  2702. }
  2703. return nil
  2704. }
  2705. func (m *Snapshot) GetMetadata() []byte {
  2706. if m != nil {
  2707. return m.Metadata
  2708. }
  2709. return nil
  2710. }
  2711. func init() {
  2712. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2713. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2714. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2715. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2716. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2717. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2718. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2719. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2720. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2721. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2722. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2723. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2724. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2725. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2726. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2727. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2728. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2729. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2730. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2731. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2732. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2733. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2734. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2735. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2736. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2737. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2738. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2739. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2740. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2741. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2742. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2743. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2744. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2745. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2746. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2747. proto.RegisterType((*ConsensusParams)(nil), "tendermint.abci.ConsensusParams")
  2748. proto.RegisterType((*BlockParams)(nil), "tendermint.abci.BlockParams")
  2749. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2750. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2751. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2752. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2753. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2754. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2755. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2756. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2757. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2758. }
  2759. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2760. var fileDescriptor_252557cfdd89a31a = []byte{
  2761. // 2691 bytes of a gzipped FileDescriptorProto
  2762. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7,
  2763. 0x11, 0xc6, 0xe2, 0xbd, 0x0d, 0xe2, 0xc1, 0x11, 0x2d, 0xc3, 0xb0, 0x4c, 0x4a, 0xab, 0x92, 0x63,
  2764. 0xc9, 0x36, 0x19, 0x53, 0x25, 0x45, 0x2a, 0x3b, 0xb1, 0x09, 0x08, 0x32, 0x68, 0x32, 0x24, 0xb3,
  2765. 0x84, 0xe4, 0xbc, 0xac, 0xf5, 0x02, 0x3b, 0x04, 0xd6, 0x02, 0x76, 0xd7, 0xd8, 0x01, 0x45, 0xfa,
  2766. 0x98, 0xc7, 0x45, 0xb9, 0xe8, 0x98, 0x8b, 0xab, 0xf2, 0x0f, 0x72, 0xcd, 0x29, 0x97, 0x5c, 0x5c,
  2767. 0x95, 0x4a, 0x95, 0x8f, 0x39, 0x39, 0x29, 0xe9, 0x96, 0x3f, 0x90, 0x53, 0x2a, 0xa9, 0x79, 0xec,
  2768. 0x0b, 0xc0, 0x12, 0x60, 0x9c, 0x5b, 0x6e, 0x3b, 0xbd, 0xdd, 0x8d, 0x99, 0xde, 0xe9, 0xaf, 0xbf,
  2769. 0xe9, 0x01, 0xbc, 0x4a, 0xb0, 0x65, 0xe0, 0xd1, 0xd0, 0xb4, 0xc8, 0x86, 0xde, 0xe9, 0x9a, 0x1b,
  2770. 0xe4, 0xd4, 0xc1, 0xee, 0xba, 0x33, 0xb2, 0x89, 0x8d, 0xca, 0xc1, 0xcb, 0x75, 0xfa, 0xb2, 0xf6,
  2771. 0x5a, 0x48, 0xbb, 0x3b, 0x3a, 0x75, 0x88, 0xbd, 0xe1, 0x8c, 0x6c, 0xfb, 0x88, 0xeb, 0xd7, 0x2e,
  2772. 0x85, 0x5e, 0x33, 0x3f, 0x61, 0x6f, 0x91, 0xb7, 0xc2, 0xf8, 0x31, 0x3e, 0xf5, 0xde, 0xbe, 0x36,
  2773. 0x65, 0xeb, 0xe8, 0x23, 0x7d, 0xe8, 0xbd, 0x5e, 0xeb, 0xd9, 0x76, 0x6f, 0x80, 0x37, 0xd8, 0xa8,
  2774. 0x33, 0x3e, 0xda, 0x20, 0xe6, 0x10, 0xbb, 0x44, 0x1f, 0x3a, 0x42, 0x61, 0xa5, 0x67, 0xf7, 0x6c,
  2775. 0xf6, 0xb8, 0x41, 0x9f, 0xb8, 0x54, 0xf9, 0x4b, 0x0e, 0x72, 0x2a, 0xfe, 0x7c, 0x8c, 0x5d, 0x82,
  2776. 0x36, 0x21, 0x8d, 0xbb, 0x7d, 0xbb, 0x2a, 0x5d, 0x96, 0xde, 0x28, 0x6c, 0x5e, 0x5a, 0x9f, 0x58,
  2777. 0xdc, 0xba, 0xd0, 0x6b, 0x76, 0xfb, 0x76, 0x2b, 0xa1, 0x32, 0x5d, 0x74, 0x0b, 0x32, 0x47, 0x83,
  2778. 0xb1, 0xdb, 0xaf, 0x26, 0x99, 0xd1, 0x6b, 0x71, 0x46, 0xf7, 0xa9, 0x52, 0x2b, 0xa1, 0x72, 0x6d,
  2779. 0xfa, 0x53, 0xa6, 0x75, 0x64, 0x57, 0x53, 0x67, 0xff, 0xd4, 0xb6, 0x75, 0xc4, 0x7e, 0x8a, 0xea,
  2780. 0xa2, 0x3a, 0x80, 0x69, 0x99, 0x44, 0xeb, 0xf6, 0x75, 0xd3, 0xaa, 0xa6, 0x99, 0xe5, 0x95, 0x78,
  2781. 0x4b, 0x93, 0x34, 0xa8, 0x62, 0x2b, 0xa1, 0xca, 0xa6, 0x37, 0xa0, 0xd3, 0xfd, 0x7c, 0x8c, 0x47,
  2782. 0xa7, 0xd5, 0xcc, 0xd9, 0xd3, 0xfd, 0x11, 0x55, 0xa2, 0xd3, 0x65, 0xda, 0xa8, 0x09, 0x85, 0x0e,
  2783. 0xee, 0x99, 0x96, 0xd6, 0x19, 0xd8, 0xdd, 0xc7, 0xd5, 0x2c, 0x33, 0x56, 0xe2, 0x8c, 0xeb, 0x54,
  2784. 0xb5, 0x4e, 0x35, 0x5b, 0x09, 0x15, 0x3a, 0xfe, 0x08, 0xbd, 0x07, 0xf9, 0x6e, 0x1f, 0x77, 0x1f,
  2785. 0x6b, 0xe4, 0xa4, 0x9a, 0x63, 0x3e, 0xd6, 0xe2, 0x7c, 0x34, 0xa8, 0x5e, 0xfb, 0xa4, 0x95, 0x50,
  2786. 0x73, 0x5d, 0xfe, 0x48, 0xd7, 0x6f, 0xe0, 0x81, 0x79, 0x8c, 0x47, 0xd4, 0x3e, 0x7f, 0xf6, 0xfa,
  2787. 0xef, 0x71, 0x4d, 0xe6, 0x41, 0x36, 0xbc, 0x01, 0x7a, 0x1f, 0x64, 0x6c, 0x19, 0x62, 0x19, 0x32,
  2788. 0x73, 0x71, 0x39, 0xf6, 0x3b, 0x5b, 0x86, 0xb7, 0x88, 0x3c, 0x16, 0xcf, 0xe8, 0x0e, 0x64, 0xbb,
  2789. 0xf6, 0x70, 0x68, 0x92, 0x2a, 0x30, 0xeb, 0xd5, 0xd8, 0x05, 0x30, 0xad, 0x56, 0x42, 0x15, 0xfa,
  2790. 0x68, 0x0f, 0x4a, 0x03, 0xd3, 0x25, 0x9a, 0x6b, 0xe9, 0x8e, 0xdb, 0xb7, 0x89, 0x5b, 0x2d, 0x30,
  2791. 0x0f, 0xd7, 0xe2, 0x3c, 0xec, 0x9a, 0x2e, 0x39, 0xf4, 0x94, 0x5b, 0x09, 0xb5, 0x38, 0x08, 0x0b,
  2792. 0xa8, 0x3f, 0xfb, 0xe8, 0x08, 0x8f, 0x7c, 0x87, 0xd5, 0xa5, 0xb3, 0xfd, 0xed, 0x53, 0x6d, 0xcf,
  2793. 0x9e, 0xfa, 0xb3, 0xc3, 0x02, 0xf4, 0x33, 0xb8, 0x30, 0xb0, 0x75, 0xc3, 0x77, 0xa7, 0x75, 0xfb,
  2794. 0x63, 0xeb, 0x71, 0xb5, 0xc8, 0x9c, 0x5e, 0x8f, 0x9d, 0xa4, 0xad, 0x1b, 0x9e, 0x8b, 0x06, 0x35,
  2795. 0x68, 0x25, 0xd4, 0xe5, 0xc1, 0xa4, 0x10, 0x3d, 0x82, 0x15, 0xdd, 0x71, 0x06, 0xa7, 0x93, 0xde,
  2796. 0x4b, 0xcc, 0xfb, 0x8d, 0x38, 0xef, 0x5b, 0xd4, 0x66, 0xd2, 0x3d, 0xd2, 0xa7, 0xa4, 0xf5, 0x1c,
  2797. 0x64, 0x8e, 0xf5, 0xc1, 0x18, 0x2b, 0xdf, 0x81, 0x42, 0x28, 0x4d, 0x51, 0x15, 0x72, 0x43, 0xec,
  2798. 0xba, 0x7a, 0x0f, 0xb3, 0xac, 0x96, 0x55, 0x6f, 0xa8, 0x94, 0x60, 0x29, 0x9c, 0x9a, 0xca, 0x33,
  2799. 0xc9, 0xb7, 0xa4, 0x59, 0x47, 0x2d, 0x8f, 0xf1, 0xc8, 0x35, 0x6d, 0xcb, 0xb3, 0x14, 0x43, 0x74,
  2800. 0x15, 0x8a, 0x6c, 0xff, 0x68, 0xde, 0x7b, 0x9a, 0xfa, 0x69, 0x75, 0x89, 0x09, 0x1f, 0x0a, 0xa5,
  2801. 0x35, 0x28, 0x38, 0x9b, 0x8e, 0xaf, 0x92, 0x62, 0x2a, 0xe0, 0x6c, 0x3a, 0x9e, 0xc2, 0x15, 0x58,
  2802. 0xa2, 0x2b, 0xf5, 0x35, 0xd2, 0xec, 0x47, 0x0a, 0x54, 0x26, 0x54, 0x94, 0x3f, 0x27, 0xa1, 0x32,
  2803. 0x99, 0xce, 0xe8, 0x0e, 0xa4, 0x29, 0xb2, 0x09, 0x90, 0xaa, 0xad, 0x73, 0xd8, 0x5b, 0xf7, 0x60,
  2804. 0x6f, 0xbd, 0xed, 0xc1, 0x5e, 0x3d, 0xff, 0xd5, 0x37, 0x6b, 0x89, 0x67, 0x7f, 0x5b, 0x93, 0x54,
  2805. 0x66, 0x81, 0x5e, 0xa1, 0xd9, 0xa7, 0x9b, 0x96, 0x66, 0x1a, 0x6c, 0xca, 0x32, 0x4d, 0x2d, 0xdd,
  2806. 0xb4, 0xb6, 0x0d, 0xb4, 0x03, 0x95, 0xae, 0x6d, 0xb9, 0xd8, 0x72, 0xc7, 0xae, 0xc6, 0x61, 0x55,
  2807. 0x40, 0xd3, 0x74, 0x76, 0x34, 0x3c, 0xc5, 0x03, 0xa6, 0xa7, 0x96, 0xbb, 0x51, 0x01, 0xba, 0x0f,
  2808. 0x70, 0xac, 0x0f, 0x4c, 0x43, 0x27, 0xf6, 0xc8, 0xad, 0xa6, 0x2f, 0xa7, 0x66, 0xba, 0x79, 0xe8,
  2809. 0xa9, 0x3c, 0x70, 0x0c, 0x9d, 0xe0, 0x7a, 0x9a, 0xce, 0x56, 0x0d, 0x59, 0xa2, 0xd7, 0xa1, 0xac,
  2810. 0x3b, 0x8e, 0xe6, 0x12, 0x9d, 0x60, 0xad, 0x73, 0x4a, 0xb0, 0xcb, 0x50, 0x6b, 0x49, 0x2d, 0xea,
  2811. 0x8e, 0x73, 0x48, 0xa5, 0x75, 0x2a, 0x44, 0xd7, 0xa0, 0x44, 0x01, 0xce, 0xd4, 0x07, 0x5a, 0x1f,
  2812. 0x9b, 0xbd, 0x3e, 0x61, 0xf8, 0x94, 0x52, 0x8b, 0x42, 0xda, 0x62, 0x42, 0xc5, 0xf0, 0x3f, 0x38,
  2813. 0x03, 0x37, 0x84, 0x20, 0x6d, 0xe8, 0x44, 0x67, 0x81, 0x5c, 0x52, 0xd9, 0x33, 0x95, 0x39, 0x3a,
  2814. 0xe9, 0x8b, 0xf0, 0xb0, 0x67, 0x74, 0x11, 0xb2, 0xc2, 0x6d, 0x8a, 0xb9, 0x15, 0x23, 0xb4, 0x02,
  2815. 0x19, 0x67, 0x64, 0x1f, 0x63, 0xf6, 0xe5, 0xf2, 0x2a, 0x1f, 0x28, 0xbf, 0x4a, 0xc2, 0xf2, 0x14,
  2816. 0x0c, 0x52, 0xbf, 0x7d, 0xdd, 0xed, 0x7b, 0xbf, 0x45, 0x9f, 0xd1, 0x6d, 0xea, 0x57, 0x37, 0xf0,
  2817. 0x48, 0x94, 0x8e, 0x6a, 0x38, 0x44, 0xbc, 0x2c, 0xb6, 0xd8, 0x7b, 0x11, 0x1a, 0xa1, 0x8d, 0xf6,
  2818. 0xa1, 0x32, 0xd0, 0x5d, 0xa2, 0x71, 0x58, 0xd1, 0x42, 0x65, 0x64, 0x1a, 0x4c, 0x77, 0x75, 0x0f,
  2819. 0x88, 0xe8, 0x9e, 0x16, 0x8e, 0x4a, 0x83, 0x88, 0x14, 0xa9, 0xb0, 0xd2, 0x39, 0xfd, 0x42, 0xb7,
  2820. 0x88, 0x69, 0x61, 0x6d, 0xea, 0xcb, 0xbd, 0x32, 0xe5, 0xb4, 0x79, 0x6c, 0x1a, 0xd8, 0xea, 0x7a,
  2821. 0x9f, 0xec, 0x82, 0x6f, 0xec, 0x7f, 0x52, 0x57, 0x51, 0xa1, 0x14, 0x05, 0x72, 0x54, 0x82, 0x24,
  2822. 0x39, 0x11, 0x01, 0x48, 0x92, 0x13, 0xf4, 0x5d, 0x48, 0xd3, 0x45, 0xb2, 0xc5, 0x97, 0x66, 0x54,
  2823. 0x40, 0x61, 0xd7, 0x3e, 0x75, 0xb0, 0xca, 0x34, 0x15, 0xc5, 0xcf, 0x06, 0x1f, 0xdc, 0x27, 0xbd,
  2824. 0x2a, 0xd7, 0xa1, 0x3c, 0x81, 0xde, 0xa1, 0xef, 0x27, 0x85, 0xbf, 0x9f, 0x52, 0x86, 0x62, 0x04,
  2825. 0xaa, 0x95, 0x8b, 0xb0, 0x32, 0x0b, 0x79, 0x95, 0xbe, 0x2f, 0x8f, 0x20, 0x28, 0xba, 0x05, 0x79,
  2826. 0x1f, 0x7a, 0x79, 0x36, 0x4e, 0xc7, 0xca, 0x53, 0x56, 0x7d, 0x55, 0x9a, 0x86, 0x74, 0x5b, 0xb3,
  2827. 0xfd, 0x90, 0x64, 0x13, 0xcf, 0xe9, 0x8e, 0xd3, 0xd2, 0xdd, 0xbe, 0xf2, 0x29, 0x54, 0xe3, 0x60,
  2828. 0x75, 0x62, 0x19, 0x69, 0x7f, 0x1b, 0x5e, 0x84, 0xec, 0x91, 0x3d, 0x1a, 0xea, 0x84, 0x39, 0x2b,
  2829. 0xaa, 0x62, 0x44, 0xb7, 0x27, 0x87, 0xd8, 0x14, 0x13, 0xf3, 0x81, 0xa2, 0xc1, 0x2b, 0xb1, 0xd0,
  2830. 0x4a, 0x4d, 0x4c, 0xcb, 0xc0, 0x3c, 0x9e, 0x45, 0x95, 0x0f, 0x02, 0x47, 0x7c, 0xb2, 0x7c, 0x40,
  2831. 0x7f, 0xd6, 0x65, 0x6b, 0x65, 0xfe, 0x65, 0x55, 0x8c, 0x94, 0xdf, 0xe5, 0x21, 0xaf, 0x62, 0xd7,
  2832. 0xa1, 0x98, 0x80, 0xea, 0x20, 0xe3, 0x93, 0x2e, 0x76, 0x88, 0x87, 0xa2, 0xb3, 0x49, 0x03, 0xd7,
  2833. 0x6e, 0x7a, 0x9a, 0xb4, 0x62, 0xfb, 0x66, 0xe8, 0xa6, 0x20, 0x65, 0xf1, 0xfc, 0x4a, 0x98, 0x87,
  2834. 0x59, 0xd9, 0x6d, 0x8f, 0x95, 0xa5, 0x62, 0x8b, 0x34, 0xb7, 0x9a, 0xa0, 0x65, 0x37, 0x05, 0x2d,
  2835. 0x4b, 0xcf, 0xf9, 0xb1, 0x08, 0x2f, 0x6b, 0x44, 0x78, 0x59, 0x66, 0xce, 0x32, 0x63, 0x88, 0xd9,
  2836. 0x6d, 0x8f, 0x98, 0x65, 0xe7, 0xcc, 0x78, 0x82, 0x99, 0xdd, 0x8f, 0x32, 0x33, 0xce, 0xaa, 0xae,
  2837. 0xc6, 0x5a, 0xc7, 0x52, 0xb3, 0xef, 0x87, 0xa8, 0x59, 0x3e, 0x96, 0x17, 0x71, 0x27, 0x33, 0xb8,
  2838. 0x59, 0x23, 0xc2, 0xcd, 0xe4, 0x39, 0x31, 0x88, 0x21, 0x67, 0x1f, 0x84, 0xc9, 0x19, 0xc4, 0xf2,
  2839. 0x3b, 0xf1, 0xbd, 0x67, 0xb1, 0xb3, 0xbb, 0x3e, 0x3b, 0x2b, 0xc4, 0xd2, 0x4b, 0xb1, 0x86, 0x49,
  2840. 0x7a, 0xb6, 0x3f, 0x45, 0xcf, 0x38, 0x9d, 0x7a, 0x3d, 0xd6, 0xc5, 0x1c, 0x7e, 0xb6, 0x3f, 0xc5,
  2841. 0xcf, 0x8a, 0x73, 0x1c, 0xce, 0x21, 0x68, 0x3f, 0x9f, 0x4d, 0xd0, 0xe2, 0x29, 0x94, 0x98, 0xe6,
  2842. 0x62, 0x0c, 0x4d, 0x8b, 0x61, 0x68, 0x65, 0xe6, 0xfe, 0xcd, 0x58, 0xf7, 0xe7, 0xa7, 0x68, 0xd7,
  2843. 0x69, 0x85, 0x9c, 0xc8, 0x79, 0x8a, 0x32, 0x78, 0x34, 0xb2, 0x47, 0x82, 0x6c, 0xf1, 0x81, 0xf2,
  2844. 0x06, 0xad, 0xd9, 0x41, 0x7e, 0x9f, 0x41, 0xe7, 0x18, 0x9a, 0x87, 0x72, 0x5a, 0xf9, 0x83, 0x14,
  2845. 0xd8, 0xb2, 0x32, 0x17, 0xae, 0xf7, 0xb2, 0xa8, 0xf7, 0x21, 0x92, 0x97, 0x8c, 0x92, 0xbc, 0x35,
  2846. 0x28, 0x50, 0x94, 0x9e, 0xe0, 0x6f, 0xba, 0xe3, 0xf3, 0xb7, 0x1b, 0xb0, 0xcc, 0xca, 0x30, 0xa7,
  2847. 0x82, 0x02, 0x9a, 0xd3, 0xac, 0xc2, 0x94, 0xe9, 0x0b, 0xbe, 0x39, 0x39, 0x46, 0xbf, 0x0d, 0x17,
  2848. 0x42, 0xba, 0x3e, 0xfa, 0x73, 0x36, 0x53, 0xf1, 0xb5, 0xb7, 0x44, 0x19, 0xf8, 0x93, 0x14, 0x44,
  2849. 0x28, 0x20, 0x7e, 0xb3, 0x38, 0x9a, 0xf4, 0xbf, 0xe1, 0x68, 0xc9, 0xff, 0x9a, 0xa3, 0x85, 0x8b,
  2850. 0x59, 0x2a, 0x5a, 0xcc, 0xfe, 0x29, 0x05, 0x9f, 0xc4, 0x67, 0x5c, 0x5d, 0xdb, 0xc0, 0xa2, 0xbc,
  2851. 0xb0, 0x67, 0x54, 0x81, 0xd4, 0xc0, 0xee, 0x89, 0x22, 0x42, 0x1f, 0xa9, 0x96, 0x8f, 0xc1, 0xb2,
  2852. 0x80, 0x58, 0xbf, 0x32, 0x65, 0x58, 0x80, 0x45, 0x65, 0xaa, 0x40, 0xea, 0x31, 0xe6, 0x88, 0xb9,
  2853. 0xa4, 0xd2, 0x47, 0xaa, 0xc7, 0xf6, 0x18, 0xc3, 0xc1, 0x25, 0x95, 0x0f, 0xd0, 0x1d, 0x90, 0x59,
  2854. 0x13, 0x42, 0xb3, 0x1d, 0x57, 0x80, 0xdb, 0xab, 0xe1, 0xb5, 0xf2, 0x5e, 0xc3, 0xfa, 0x01, 0xd5,
  2855. 0xd9, 0x77, 0x5c, 0x35, 0xef, 0x88, 0xa7, 0x50, 0xd1, 0x95, 0x23, 0xdc, 0xef, 0x12, 0xc8, 0x74,
  2856. 0xf6, 0xae, 0xa3, 0x77, 0x31, 0x43, 0x2a, 0x59, 0x0d, 0x04, 0xca, 0x23, 0x40, 0xd3, 0x78, 0x8b,
  2857. 0x5a, 0x90, 0xc5, 0xc7, 0xd8, 0x22, 0xf4, 0xab, 0xd1, 0x70, 0x5f, 0x9c, 0x41, 0xac, 0xb0, 0x45,
  2858. 0xea, 0x55, 0x1a, 0xe4, 0x7f, 0x7c, 0xb3, 0x56, 0xe1, 0xda, 0x6f, 0xd9, 0x43, 0x93, 0xe0, 0xa1,
  2859. 0x43, 0x4e, 0x55, 0x61, 0xaf, 0xfc, 0x32, 0x49, 0x59, 0x4e, 0x04, 0x8b, 0x67, 0xc6, 0xd6, 0xdb,
  2860. 0xf1, 0xc9, 0x10, 0xc3, 0x5d, 0x2c, 0xde, 0xab, 0x00, 0x3d, 0xdd, 0xd5, 0x9e, 0xe8, 0x16, 0xc1,
  2861. 0x86, 0x08, 0x7a, 0x48, 0x82, 0x6a, 0x90, 0xa7, 0xa3, 0xb1, 0x8b, 0x0d, 0x41, 0xb6, 0xfd, 0x71,
  2862. 0x68, 0x9d, 0xb9, 0x6f, 0xb7, 0xce, 0x68, 0x94, 0xf3, 0x93, 0x51, 0xfe, 0x75, 0x32, 0xc8, 0x92,
  2863. 0x80, 0x10, 0xfe, 0xff, 0xc5, 0xe1, 0x37, 0xec, 0x94, 0x18, 0x2d, 0x8a, 0xe8, 0x10, 0x96, 0xfd,
  2864. 0x2c, 0xd5, 0xc6, 0x2c, 0x7b, 0xbd, 0x7d, 0xb7, 0x68, 0x9a, 0x57, 0x8e, 0xa3, 0x62, 0x17, 0xfd,
  2865. 0x18, 0x5e, 0x9e, 0x40, 0x20, 0xdf, 0x75, 0x72, 0x41, 0x20, 0x7a, 0x29, 0x0a, 0x44, 0x9e, 0xe7,
  2866. 0x20, 0x56, 0xa9, 0x6f, 0x99, 0x1b, 0xdb, 0xf4, 0xe0, 0x11, 0x2e, 0xf1, 0x33, 0xbf, 0xfe, 0x55,
  2867. 0x28, 0x8e, 0x30, 0xa1, 0x67, 0xe1, 0xc8, 0xd1, 0x6e, 0x89, 0x0b, 0xc5, 0x81, 0xf1, 0x00, 0x5e,
  2868. 0x9a, 0x59, 0xea, 0xd1, 0xf7, 0x40, 0x0e, 0x58, 0x82, 0x14, 0x73, 0x4a, 0xf2, 0x99, 0x7f, 0xa0,
  2869. 0xab, 0xfc, 0x51, 0x0a, 0x5c, 0x46, 0xcf, 0x12, 0x4d, 0xc8, 0x8e, 0xb0, 0x3b, 0x1e, 0x70, 0x76,
  2870. 0x5f, 0xda, 0x7c, 0x7b, 0x31, 0x92, 0x40, 0xa5, 0xe3, 0x01, 0x51, 0x85, 0xb1, 0xf2, 0x08, 0xb2,
  2871. 0x5c, 0x82, 0x0a, 0x90, 0x7b, 0xb0, 0xb7, 0xb3, 0xb7, 0xff, 0xf1, 0x5e, 0x25, 0x81, 0x00, 0xb2,
  2872. 0x5b, 0x8d, 0x46, 0xf3, 0xa0, 0x5d, 0x91, 0x90, 0x0c, 0x99, 0xad, 0xfa, 0xbe, 0xda, 0xae, 0x24,
  2873. 0xa9, 0x58, 0x6d, 0x7e, 0xd4, 0x6c, 0xb4, 0x2b, 0x29, 0xb4, 0x0c, 0x45, 0xfe, 0xac, 0xdd, 0xdf,
  2874. 0x57, 0x7f, 0xb8, 0xd5, 0xae, 0xa4, 0x43, 0xa2, 0xc3, 0xe6, 0xde, 0xbd, 0xa6, 0x5a, 0xc9, 0x28,
  2875. 0xef, 0xd0, 0xe3, 0x43, 0x0c, 0xad, 0x08, 0x0e, 0x0a, 0x52, 0xe8, 0xa0, 0xa0, 0xfc, 0x36, 0x09,
  2876. 0xb5, 0x78, 0xae, 0x80, 0x3e, 0x9a, 0x58, 0xf8, 0xe6, 0x39, 0x88, 0xc6, 0xc4, 0xea, 0xd1, 0x35,
  2877. 0x28, 0x8d, 0xf0, 0x11, 0x26, 0xdd, 0x3e, 0xe7, 0x2e, 0xbc, 0xb0, 0x15, 0xd5, 0xa2, 0x90, 0x32,
  2878. 0x23, 0x97, 0xab, 0x7d, 0x86, 0xbb, 0x44, 0xe3, 0x67, 0x16, 0xbe, 0xe9, 0x64, 0xaa, 0x46, 0xa5,
  2879. 0x87, 0x5c, 0xa8, 0x7c, 0x7a, 0xae, 0x58, 0xca, 0x90, 0x51, 0x9b, 0x6d, 0xf5, 0x27, 0x95, 0x14,
  2880. 0x42, 0x50, 0x62, 0x8f, 0xda, 0xe1, 0xde, 0xd6, 0xc1, 0x61, 0x6b, 0x9f, 0xc6, 0xf2, 0x02, 0x94,
  2881. 0xbd, 0x58, 0x7a, 0xc2, 0x8c, 0xf2, 0x6f, 0x09, 0xca, 0x13, 0x09, 0x82, 0x36, 0x21, 0xc3, 0xf9,
  2882. 0x6f, 0x5c, 0x13, 0x9a, 0xe5, 0xb7, 0xc8, 0x26, 0xae, 0x8a, 0xde, 0x83, 0x3c, 0x16, 0x67, 0xf2,
  2883. 0x59, 0x89, 0xc8, 0x7b, 0x09, 0xde, 0xa9, 0x5d, 0x98, 0xfa, 0x16, 0xe8, 0x7d, 0x90, 0xfd, 0x4c,
  2884. 0x17, 0xe7, 0xa5, 0x2b, 0xd3, 0xe6, 0x3e, 0x46, 0x08, 0xfb, 0xc0, 0x06, 0xdd, 0x0d, 0x48, 0x54,
  2885. 0x7a, 0x9a, 0x75, 0x0b, 0x73, 0xae, 0x20, 0x8c, 0x3d, 0x7d, 0xa5, 0x01, 0x85, 0xd0, 0x7a, 0xd0,
  2886. 0xab, 0x20, 0x0f, 0xf5, 0x13, 0xd1, 0xeb, 0xe1, 0xa7, 0xf5, 0xfc, 0x50, 0x3f, 0xe1, 0x6d, 0x9e,
  2887. 0x97, 0x21, 0x47, 0x5f, 0xf6, 0x74, 0x8e, 0x36, 0x29, 0x35, 0x3b, 0xd4, 0x4f, 0x3e, 0xd4, 0x5d,
  2888. 0xe5, 0x13, 0x28, 0x45, 0xfb, 0x1c, 0x74, 0x27, 0x8e, 0xec, 0xb1, 0x65, 0x30, 0x1f, 0x19, 0x95,
  2889. 0x0f, 0xd0, 0x2d, 0xc8, 0x1c, 0xdb, 0x1c, 0xac, 0x66, 0xa7, 0xec, 0x43, 0x9b, 0xe0, 0x50, 0x9f,
  2890. 0x84, 0x6b, 0x2b, 0x5f, 0x40, 0x86, 0x81, 0x0f, 0x05, 0x12, 0xd6, 0xb1, 0x10, 0x04, 0x92, 0x3e,
  2891. 0xa3, 0x4f, 0x00, 0x74, 0x42, 0x46, 0x66, 0x67, 0x1c, 0x38, 0x5e, 0x9b, 0x0d, 0x5e, 0x5b, 0x9e,
  2892. 0x5e, 0xfd, 0x92, 0x40, 0xb1, 0x95, 0xc0, 0x34, 0x84, 0x64, 0x21, 0x87, 0xca, 0x1e, 0x94, 0xa2,
  2893. 0xb6, 0x1e, 0xe7, 0x91, 0x66, 0x70, 0x9e, 0x64, 0x98, 0xf3, 0xf8, 0x8c, 0x29, 0xc5, 0xbb, 0x53,
  2894. 0x6c, 0xa0, 0x3c, 0x95, 0x20, 0xdf, 0x3e, 0x11, 0xdb, 0x3a, 0xa6, 0x31, 0x12, 0x98, 0x26, 0xc3,
  2895. 0x6d, 0x00, 0xde, 0x69, 0x49, 0xf9, 0xfd, 0x9b, 0x0f, 0xfc, 0xc4, 0x4d, 0x2f, 0x7a, 0xda, 0xf3,
  2896. 0x1a, 0x59, 0x02, 0xac, 0xde, 0x05, 0xd9, 0xdf, 0x55, 0x94, 0x89, 0xeb, 0x86, 0x31, 0xc2, 0xae,
  2897. 0x2b, 0xd6, 0xe6, 0x0d, 0x59, 0x9f, 0xcd, 0x7e, 0x22, 0x1a, 0x0d, 0x29, 0x95, 0x0f, 0x14, 0x03,
  2898. 0xca, 0x13, 0x65, 0x0b, 0xbd, 0x0b, 0x39, 0x67, 0xdc, 0xd1, 0xbc, 0xf0, 0x4c, 0x24, 0x8f, 0x47,
  2899. 0xf2, 0xc6, 0x9d, 0x81, 0xd9, 0xdd, 0xc1, 0xa7, 0xde, 0x64, 0x9c, 0x71, 0x67, 0x87, 0x47, 0x91,
  2900. 0xff, 0x4a, 0x32, 0xfc, 0x2b, 0xc7, 0x90, 0xf7, 0x36, 0x05, 0xfa, 0x41, 0x38, 0x4f, 0xbc, 0xee,
  2901. 0x6b, 0x6c, 0x29, 0x15, 0xee, 0x43, 0x69, 0x72, 0x03, 0x96, 0x5d, 0xb3, 0x67, 0x61, 0x43, 0x0b,
  2902. 0xce, 0x02, 0xec, 0xd7, 0xf2, 0x6a, 0x99, 0xbf, 0xd8, 0xf5, 0x0e, 0x02, 0xca, 0xbf, 0x24, 0xc8,
  2903. 0x7b, 0x09, 0x8b, 0xde, 0x09, 0xed, 0xbb, 0xd2, 0x8c, 0xa6, 0x84, 0xa7, 0x18, 0xb4, 0xca, 0xa2,
  2904. 0x73, 0x4d, 0x9e, 0x7f, 0xae, 0x71, 0x3d, 0x4f, 0xaf, 0xf9, 0x9c, 0x3e, 0x77, 0xf3, 0xf9, 0x2d,
  2905. 0x40, 0xc4, 0x26, 0xfa, 0x40, 0x3b, 0xb6, 0x89, 0x69, 0xf5, 0x34, 0x1e, 0x6c, 0xce, 0xa8, 0x2a,
  2906. 0xec, 0xcd, 0x43, 0xf6, 0xe2, 0x80, 0xc5, 0xfd, 0x17, 0x12, 0xe4, 0xfd, 0xda, 0x78, 0xde, 0xce,
  2907. 0xd7, 0x45, 0xc8, 0x0a, 0xf8, 0xe7, 0xad, 0x2f, 0x31, 0xf2, 0x9b, 0xb0, 0xe9, 0x50, 0x13, 0xb6,
  2908. 0x06, 0xf9, 0x21, 0x26, 0x3a, 0x23, 0x08, 0xfc, 0x38, 0xe6, 0x8f, 0x6f, 0xdc, 0x85, 0x42, 0xa8,
  2909. 0x09, 0x49, 0x33, 0x6f, 0xaf, 0xf9, 0x71, 0x25, 0x51, 0xcb, 0x3d, 0xfd, 0xf2, 0x72, 0x6a, 0x0f,
  2910. 0x3f, 0xa1, 0x7b, 0x56, 0x6d, 0x36, 0x5a, 0xcd, 0xc6, 0x4e, 0x45, 0xaa, 0x15, 0x9e, 0x7e, 0x79,
  2911. 0x39, 0xa7, 0x62, 0xd6, 0x10, 0xb9, 0xd1, 0x82, 0xa5, 0xf0, 0x57, 0x89, 0x56, 0x10, 0x04, 0xa5,
  2912. 0x7b, 0x0f, 0x0e, 0x76, 0xb7, 0x1b, 0x5b, 0xed, 0xa6, 0xf6, 0x70, 0xbf, 0xdd, 0xac, 0x48, 0xe8,
  2913. 0x65, 0xb8, 0xb0, 0xbb, 0xfd, 0x61, 0xab, 0xad, 0x35, 0x76, 0xb7, 0x9b, 0x7b, 0x6d, 0x6d, 0xab,
  2914. 0xdd, 0xde, 0x6a, 0xec, 0x54, 0x92, 0x9b, 0xbf, 0x97, 0xa1, 0xbc, 0x55, 0x6f, 0x6c, 0xd3, 0xea,
  2915. 0x67, 0x76, 0x75, 0x76, 0x56, 0x6e, 0x40, 0x9a, 0x9d, 0x86, 0xcf, 0xbc, 0xa1, 0xac, 0x9d, 0xdd,
  2916. 0x2a, 0x43, 0xf7, 0x21, 0xc3, 0x0e, 0xca, 0xe8, 0xec, 0x2b, 0xcb, 0xda, 0x9c, 0xde, 0x19, 0x9d,
  2917. 0x0c, 0x4b, 0x8f, 0x33, 0xef, 0x30, 0x6b, 0x67, 0xb7, 0xd2, 0x90, 0x0a, 0x72, 0x40, 0xe1, 0xe7,
  2918. 0xdf, 0xe9, 0xd5, 0x16, 0x00, 0x1b, 0xb4, 0x0b, 0x39, 0xef, 0x70, 0x34, 0xef, 0x96, 0xb1, 0x36,
  2919. 0xb7, 0xd7, 0x45, 0xc3, 0xc5, 0x0f, 0xb1, 0x67, 0x5f, 0x99, 0xd6, 0xe6, 0x34, 0xee, 0xd0, 0x36,
  2920. 0x64, 0x05, 0x2f, 0x9d, 0x73, 0x73, 0x58, 0x9b, 0xd7, 0xbb, 0xa2, 0x41, 0x0b, 0xba, 0x03, 0xf3,
  2921. 0x2f, 0x82, 0x6b, 0x0b, 0xf4, 0x24, 0xd1, 0x03, 0x80, 0xd0, 0x91, 0x75, 0x81, 0x1b, 0xde, 0xda,
  2922. 0x22, 0xbd, 0x46, 0xb4, 0x0f, 0x79, 0xff, 0x68, 0x32, 0xf7, 0xbe, 0xb5, 0x36, 0xbf, 0xe9, 0x87,
  2923. 0x1e, 0x41, 0x31, 0xca, 0xc9, 0x17, 0xbb, 0x45, 0xad, 0x2d, 0xd8, 0xcd, 0xa3, 0xfe, 0xa3, 0x04,
  2924. 0x7d, 0xb1, 0x5b, 0xd5, 0xda, 0x82, 0xcd, 0x3d, 0xf4, 0x19, 0x2c, 0x4f, 0x13, 0xe8, 0xc5, 0x2f,
  2925. 0x59, 0x6b, 0xe7, 0x68, 0xf7, 0xa1, 0x21, 0xa0, 0x19, 0xc4, 0xfb, 0x1c, 0x77, 0xae, 0xb5, 0xf3,
  2926. 0x74, 0xff, 0xea, 0xcd, 0xaf, 0x9e, 0xaf, 0x4a, 0x5f, 0x3f, 0x5f, 0x95, 0xfe, 0xfe, 0x7c, 0x55,
  2927. 0x7a, 0xf6, 0x62, 0x35, 0xf1, 0xf5, 0x8b, 0xd5, 0xc4, 0x5f, 0x5f, 0xac, 0x26, 0x7e, 0xfa, 0x66,
  2928. 0xcf, 0x24, 0xfd, 0x71, 0x67, 0xbd, 0x6b, 0x0f, 0x37, 0xc2, 0x7f, 0xe6, 0x98, 0xf5, 0x07, 0x93,
  2929. 0x4e, 0x96, 0x15, 0x95, 0x9b, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1b, 0xc1, 0x1e, 0x80,
  2930. 0x22, 0x00, 0x00,
  2931. }
  2932. // Reference imports to suppress errors if they are not otherwise used.
  2933. var _ context.Context
  2934. var _ grpc.ClientConn
  2935. // This is a compile-time assertion to ensure that this generated file
  2936. // is compatible with the grpc package it is being compiled against.
  2937. const _ = grpc.SupportPackageIsVersion4
  2938. // ABCIApplicationClient is the client API for ABCIApplication service.
  2939. //
  2940. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2941. type ABCIApplicationClient interface {
  2942. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2943. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2944. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2945. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2946. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2947. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2948. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2949. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2950. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2951. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2952. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2953. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2954. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2955. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2956. }
  2957. type aBCIApplicationClient struct {
  2958. cc *grpc.ClientConn
  2959. }
  2960. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2961. return &aBCIApplicationClient{cc}
  2962. }
  2963. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2964. out := new(ResponseEcho)
  2965. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2966. if err != nil {
  2967. return nil, err
  2968. }
  2969. return out, nil
  2970. }
  2971. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2972. out := new(ResponseFlush)
  2973. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2974. if err != nil {
  2975. return nil, err
  2976. }
  2977. return out, nil
  2978. }
  2979. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2980. out := new(ResponseInfo)
  2981. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2982. if err != nil {
  2983. return nil, err
  2984. }
  2985. return out, nil
  2986. }
  2987. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2988. out := new(ResponseDeliverTx)
  2989. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2990. if err != nil {
  2991. return nil, err
  2992. }
  2993. return out, nil
  2994. }
  2995. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2996. out := new(ResponseCheckTx)
  2997. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2998. if err != nil {
  2999. return nil, err
  3000. }
  3001. return out, nil
  3002. }
  3003. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  3004. out := new(ResponseQuery)
  3005. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  3006. if err != nil {
  3007. return nil, err
  3008. }
  3009. return out, nil
  3010. }
  3011. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  3012. out := new(ResponseCommit)
  3013. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  3014. if err != nil {
  3015. return nil, err
  3016. }
  3017. return out, nil
  3018. }
  3019. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  3020. out := new(ResponseInitChain)
  3021. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  3022. if err != nil {
  3023. return nil, err
  3024. }
  3025. return out, nil
  3026. }
  3027. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  3028. out := new(ResponseBeginBlock)
  3029. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  3030. if err != nil {
  3031. return nil, err
  3032. }
  3033. return out, nil
  3034. }
  3035. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  3036. out := new(ResponseEndBlock)
  3037. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  3038. if err != nil {
  3039. return nil, err
  3040. }
  3041. return out, nil
  3042. }
  3043. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  3044. out := new(ResponseListSnapshots)
  3045. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  3046. if err != nil {
  3047. return nil, err
  3048. }
  3049. return out, nil
  3050. }
  3051. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  3052. out := new(ResponseOfferSnapshot)
  3053. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  3054. if err != nil {
  3055. return nil, err
  3056. }
  3057. return out, nil
  3058. }
  3059. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  3060. out := new(ResponseLoadSnapshotChunk)
  3061. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  3062. if err != nil {
  3063. return nil, err
  3064. }
  3065. return out, nil
  3066. }
  3067. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  3068. out := new(ResponseApplySnapshotChunk)
  3069. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  3070. if err != nil {
  3071. return nil, err
  3072. }
  3073. return out, nil
  3074. }
  3075. // ABCIApplicationServer is the server API for ABCIApplication service.
  3076. type ABCIApplicationServer interface {
  3077. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  3078. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  3079. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  3080. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  3081. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  3082. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  3083. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  3084. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  3085. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  3086. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  3087. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  3088. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  3089. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  3090. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  3091. }
  3092. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  3093. type UnimplementedABCIApplicationServer struct {
  3094. }
  3095. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3096. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3097. }
  3098. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3099. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3100. }
  3101. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3102. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3103. }
  3104. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3105. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3106. }
  3107. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3108. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3109. }
  3110. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3111. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3112. }
  3113. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3114. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3115. }
  3116. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3117. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3118. }
  3119. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3120. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3121. }
  3122. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3123. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3124. }
  3125. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3126. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3127. }
  3128. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3129. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3130. }
  3131. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3132. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3133. }
  3134. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3135. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3136. }
  3137. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3138. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3139. }
  3140. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3141. in := new(RequestEcho)
  3142. if err := dec(in); err != nil {
  3143. return nil, err
  3144. }
  3145. if interceptor == nil {
  3146. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3147. }
  3148. info := &grpc.UnaryServerInfo{
  3149. Server: srv,
  3150. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3151. }
  3152. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3153. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3154. }
  3155. return interceptor(ctx, in, info, handler)
  3156. }
  3157. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3158. in := new(RequestFlush)
  3159. if err := dec(in); err != nil {
  3160. return nil, err
  3161. }
  3162. if interceptor == nil {
  3163. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3164. }
  3165. info := &grpc.UnaryServerInfo{
  3166. Server: srv,
  3167. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3168. }
  3169. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3170. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3171. }
  3172. return interceptor(ctx, in, info, handler)
  3173. }
  3174. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3175. in := new(RequestInfo)
  3176. if err := dec(in); err != nil {
  3177. return nil, err
  3178. }
  3179. if interceptor == nil {
  3180. return srv.(ABCIApplicationServer).Info(ctx, in)
  3181. }
  3182. info := &grpc.UnaryServerInfo{
  3183. Server: srv,
  3184. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3185. }
  3186. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3187. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3188. }
  3189. return interceptor(ctx, in, info, handler)
  3190. }
  3191. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3192. in := new(RequestDeliverTx)
  3193. if err := dec(in); err != nil {
  3194. return nil, err
  3195. }
  3196. if interceptor == nil {
  3197. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3198. }
  3199. info := &grpc.UnaryServerInfo{
  3200. Server: srv,
  3201. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3202. }
  3203. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3204. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3205. }
  3206. return interceptor(ctx, in, info, handler)
  3207. }
  3208. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3209. in := new(RequestCheckTx)
  3210. if err := dec(in); err != nil {
  3211. return nil, err
  3212. }
  3213. if interceptor == nil {
  3214. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3215. }
  3216. info := &grpc.UnaryServerInfo{
  3217. Server: srv,
  3218. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3219. }
  3220. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3221. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3222. }
  3223. return interceptor(ctx, in, info, handler)
  3224. }
  3225. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3226. in := new(RequestQuery)
  3227. if err := dec(in); err != nil {
  3228. return nil, err
  3229. }
  3230. if interceptor == nil {
  3231. return srv.(ABCIApplicationServer).Query(ctx, in)
  3232. }
  3233. info := &grpc.UnaryServerInfo{
  3234. Server: srv,
  3235. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3236. }
  3237. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3238. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3239. }
  3240. return interceptor(ctx, in, info, handler)
  3241. }
  3242. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3243. in := new(RequestCommit)
  3244. if err := dec(in); err != nil {
  3245. return nil, err
  3246. }
  3247. if interceptor == nil {
  3248. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3249. }
  3250. info := &grpc.UnaryServerInfo{
  3251. Server: srv,
  3252. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3253. }
  3254. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3255. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3256. }
  3257. return interceptor(ctx, in, info, handler)
  3258. }
  3259. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3260. in := new(RequestInitChain)
  3261. if err := dec(in); err != nil {
  3262. return nil, err
  3263. }
  3264. if interceptor == nil {
  3265. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3266. }
  3267. info := &grpc.UnaryServerInfo{
  3268. Server: srv,
  3269. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3270. }
  3271. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3272. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3273. }
  3274. return interceptor(ctx, in, info, handler)
  3275. }
  3276. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3277. in := new(RequestBeginBlock)
  3278. if err := dec(in); err != nil {
  3279. return nil, err
  3280. }
  3281. if interceptor == nil {
  3282. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3283. }
  3284. info := &grpc.UnaryServerInfo{
  3285. Server: srv,
  3286. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3287. }
  3288. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3289. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3290. }
  3291. return interceptor(ctx, in, info, handler)
  3292. }
  3293. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3294. in := new(RequestEndBlock)
  3295. if err := dec(in); err != nil {
  3296. return nil, err
  3297. }
  3298. if interceptor == nil {
  3299. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3300. }
  3301. info := &grpc.UnaryServerInfo{
  3302. Server: srv,
  3303. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3304. }
  3305. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3306. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3307. }
  3308. return interceptor(ctx, in, info, handler)
  3309. }
  3310. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3311. in := new(RequestListSnapshots)
  3312. if err := dec(in); err != nil {
  3313. return nil, err
  3314. }
  3315. if interceptor == nil {
  3316. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3317. }
  3318. info := &grpc.UnaryServerInfo{
  3319. Server: srv,
  3320. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3321. }
  3322. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3323. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3324. }
  3325. return interceptor(ctx, in, info, handler)
  3326. }
  3327. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3328. in := new(RequestOfferSnapshot)
  3329. if err := dec(in); err != nil {
  3330. return nil, err
  3331. }
  3332. if interceptor == nil {
  3333. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3334. }
  3335. info := &grpc.UnaryServerInfo{
  3336. Server: srv,
  3337. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3338. }
  3339. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3340. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3341. }
  3342. return interceptor(ctx, in, info, handler)
  3343. }
  3344. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3345. in := new(RequestLoadSnapshotChunk)
  3346. if err := dec(in); err != nil {
  3347. return nil, err
  3348. }
  3349. if interceptor == nil {
  3350. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3351. }
  3352. info := &grpc.UnaryServerInfo{
  3353. Server: srv,
  3354. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3355. }
  3356. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3357. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3358. }
  3359. return interceptor(ctx, in, info, handler)
  3360. }
  3361. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3362. in := new(RequestApplySnapshotChunk)
  3363. if err := dec(in); err != nil {
  3364. return nil, err
  3365. }
  3366. if interceptor == nil {
  3367. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3368. }
  3369. info := &grpc.UnaryServerInfo{
  3370. Server: srv,
  3371. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3372. }
  3373. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3374. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3375. }
  3376. return interceptor(ctx, in, info, handler)
  3377. }
  3378. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3379. ServiceName: "tendermint.abci.ABCIApplication",
  3380. HandlerType: (*ABCIApplicationServer)(nil),
  3381. Methods: []grpc.MethodDesc{
  3382. {
  3383. MethodName: "Echo",
  3384. Handler: _ABCIApplication_Echo_Handler,
  3385. },
  3386. {
  3387. MethodName: "Flush",
  3388. Handler: _ABCIApplication_Flush_Handler,
  3389. },
  3390. {
  3391. MethodName: "Info",
  3392. Handler: _ABCIApplication_Info_Handler,
  3393. },
  3394. {
  3395. MethodName: "DeliverTx",
  3396. Handler: _ABCIApplication_DeliverTx_Handler,
  3397. },
  3398. {
  3399. MethodName: "CheckTx",
  3400. Handler: _ABCIApplication_CheckTx_Handler,
  3401. },
  3402. {
  3403. MethodName: "Query",
  3404. Handler: _ABCIApplication_Query_Handler,
  3405. },
  3406. {
  3407. MethodName: "Commit",
  3408. Handler: _ABCIApplication_Commit_Handler,
  3409. },
  3410. {
  3411. MethodName: "InitChain",
  3412. Handler: _ABCIApplication_InitChain_Handler,
  3413. },
  3414. {
  3415. MethodName: "BeginBlock",
  3416. Handler: _ABCIApplication_BeginBlock_Handler,
  3417. },
  3418. {
  3419. MethodName: "EndBlock",
  3420. Handler: _ABCIApplication_EndBlock_Handler,
  3421. },
  3422. {
  3423. MethodName: "ListSnapshots",
  3424. Handler: _ABCIApplication_ListSnapshots_Handler,
  3425. },
  3426. {
  3427. MethodName: "OfferSnapshot",
  3428. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3429. },
  3430. {
  3431. MethodName: "LoadSnapshotChunk",
  3432. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3433. },
  3434. {
  3435. MethodName: "ApplySnapshotChunk",
  3436. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3437. },
  3438. },
  3439. Streams: []grpc.StreamDesc{},
  3440. Metadata: "tendermint/abci/types.proto",
  3441. }
  3442. func (m *Request) Marshal() (dAtA []byte, err error) {
  3443. size := m.Size()
  3444. dAtA = make([]byte, size)
  3445. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3446. if err != nil {
  3447. return nil, err
  3448. }
  3449. return dAtA[:n], nil
  3450. }
  3451. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3452. size := m.Size()
  3453. return m.MarshalToSizedBuffer(dAtA[:size])
  3454. }
  3455. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3456. i := len(dAtA)
  3457. _ = i
  3458. var l int
  3459. _ = l
  3460. if m.Value != nil {
  3461. {
  3462. size := m.Value.Size()
  3463. i -= size
  3464. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3465. return 0, err
  3466. }
  3467. }
  3468. }
  3469. return len(dAtA) - i, nil
  3470. }
  3471. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3472. size := m.Size()
  3473. return m.MarshalToSizedBuffer(dAtA[:size])
  3474. }
  3475. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3476. i := len(dAtA)
  3477. if m.Echo != nil {
  3478. {
  3479. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3480. if err != nil {
  3481. return 0, err
  3482. }
  3483. i -= size
  3484. i = encodeVarintTypes(dAtA, i, uint64(size))
  3485. }
  3486. i--
  3487. dAtA[i] = 0xa
  3488. }
  3489. return len(dAtA) - i, nil
  3490. }
  3491. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3492. size := m.Size()
  3493. return m.MarshalToSizedBuffer(dAtA[:size])
  3494. }
  3495. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3496. i := len(dAtA)
  3497. if m.Flush != nil {
  3498. {
  3499. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3500. if err != nil {
  3501. return 0, err
  3502. }
  3503. i -= size
  3504. i = encodeVarintTypes(dAtA, i, uint64(size))
  3505. }
  3506. i--
  3507. dAtA[i] = 0x12
  3508. }
  3509. return len(dAtA) - i, nil
  3510. }
  3511. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3512. size := m.Size()
  3513. return m.MarshalToSizedBuffer(dAtA[:size])
  3514. }
  3515. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3516. i := len(dAtA)
  3517. if m.Info != nil {
  3518. {
  3519. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3520. if err != nil {
  3521. return 0, err
  3522. }
  3523. i -= size
  3524. i = encodeVarintTypes(dAtA, i, uint64(size))
  3525. }
  3526. i--
  3527. dAtA[i] = 0x1a
  3528. }
  3529. return len(dAtA) - i, nil
  3530. }
  3531. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3532. size := m.Size()
  3533. return m.MarshalToSizedBuffer(dAtA[:size])
  3534. }
  3535. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3536. i := len(dAtA)
  3537. if m.InitChain != nil {
  3538. {
  3539. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3540. if err != nil {
  3541. return 0, err
  3542. }
  3543. i -= size
  3544. i = encodeVarintTypes(dAtA, i, uint64(size))
  3545. }
  3546. i--
  3547. dAtA[i] = 0x22
  3548. }
  3549. return len(dAtA) - i, nil
  3550. }
  3551. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3552. size := m.Size()
  3553. return m.MarshalToSizedBuffer(dAtA[:size])
  3554. }
  3555. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3556. i := len(dAtA)
  3557. if m.Query != nil {
  3558. {
  3559. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3560. if err != nil {
  3561. return 0, err
  3562. }
  3563. i -= size
  3564. i = encodeVarintTypes(dAtA, i, uint64(size))
  3565. }
  3566. i--
  3567. dAtA[i] = 0x2a
  3568. }
  3569. return len(dAtA) - i, nil
  3570. }
  3571. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3572. size := m.Size()
  3573. return m.MarshalToSizedBuffer(dAtA[:size])
  3574. }
  3575. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3576. i := len(dAtA)
  3577. if m.BeginBlock != nil {
  3578. {
  3579. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3580. if err != nil {
  3581. return 0, err
  3582. }
  3583. i -= size
  3584. i = encodeVarintTypes(dAtA, i, uint64(size))
  3585. }
  3586. i--
  3587. dAtA[i] = 0x32
  3588. }
  3589. return len(dAtA) - i, nil
  3590. }
  3591. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3592. size := m.Size()
  3593. return m.MarshalToSizedBuffer(dAtA[:size])
  3594. }
  3595. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3596. i := len(dAtA)
  3597. if m.CheckTx != nil {
  3598. {
  3599. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3600. if err != nil {
  3601. return 0, err
  3602. }
  3603. i -= size
  3604. i = encodeVarintTypes(dAtA, i, uint64(size))
  3605. }
  3606. i--
  3607. dAtA[i] = 0x3a
  3608. }
  3609. return len(dAtA) - i, nil
  3610. }
  3611. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3612. size := m.Size()
  3613. return m.MarshalToSizedBuffer(dAtA[:size])
  3614. }
  3615. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3616. i := len(dAtA)
  3617. if m.DeliverTx != nil {
  3618. {
  3619. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3620. if err != nil {
  3621. return 0, err
  3622. }
  3623. i -= size
  3624. i = encodeVarintTypes(dAtA, i, uint64(size))
  3625. }
  3626. i--
  3627. dAtA[i] = 0x42
  3628. }
  3629. return len(dAtA) - i, nil
  3630. }
  3631. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3632. size := m.Size()
  3633. return m.MarshalToSizedBuffer(dAtA[:size])
  3634. }
  3635. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3636. i := len(dAtA)
  3637. if m.EndBlock != nil {
  3638. {
  3639. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3640. if err != nil {
  3641. return 0, err
  3642. }
  3643. i -= size
  3644. i = encodeVarintTypes(dAtA, i, uint64(size))
  3645. }
  3646. i--
  3647. dAtA[i] = 0x4a
  3648. }
  3649. return len(dAtA) - i, nil
  3650. }
  3651. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3652. size := m.Size()
  3653. return m.MarshalToSizedBuffer(dAtA[:size])
  3654. }
  3655. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3656. i := len(dAtA)
  3657. if m.Commit != nil {
  3658. {
  3659. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3660. if err != nil {
  3661. return 0, err
  3662. }
  3663. i -= size
  3664. i = encodeVarintTypes(dAtA, i, uint64(size))
  3665. }
  3666. i--
  3667. dAtA[i] = 0x52
  3668. }
  3669. return len(dAtA) - i, nil
  3670. }
  3671. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3672. size := m.Size()
  3673. return m.MarshalToSizedBuffer(dAtA[:size])
  3674. }
  3675. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3676. i := len(dAtA)
  3677. if m.ListSnapshots != nil {
  3678. {
  3679. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3680. if err != nil {
  3681. return 0, err
  3682. }
  3683. i -= size
  3684. i = encodeVarintTypes(dAtA, i, uint64(size))
  3685. }
  3686. i--
  3687. dAtA[i] = 0x5a
  3688. }
  3689. return len(dAtA) - i, nil
  3690. }
  3691. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3692. size := m.Size()
  3693. return m.MarshalToSizedBuffer(dAtA[:size])
  3694. }
  3695. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3696. i := len(dAtA)
  3697. if m.OfferSnapshot != nil {
  3698. {
  3699. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3700. if err != nil {
  3701. return 0, err
  3702. }
  3703. i -= size
  3704. i = encodeVarintTypes(dAtA, i, uint64(size))
  3705. }
  3706. i--
  3707. dAtA[i] = 0x62
  3708. }
  3709. return len(dAtA) - i, nil
  3710. }
  3711. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3712. size := m.Size()
  3713. return m.MarshalToSizedBuffer(dAtA[:size])
  3714. }
  3715. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3716. i := len(dAtA)
  3717. if m.LoadSnapshotChunk != nil {
  3718. {
  3719. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3720. if err != nil {
  3721. return 0, err
  3722. }
  3723. i -= size
  3724. i = encodeVarintTypes(dAtA, i, uint64(size))
  3725. }
  3726. i--
  3727. dAtA[i] = 0x6a
  3728. }
  3729. return len(dAtA) - i, nil
  3730. }
  3731. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3732. size := m.Size()
  3733. return m.MarshalToSizedBuffer(dAtA[:size])
  3734. }
  3735. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3736. i := len(dAtA)
  3737. if m.ApplySnapshotChunk != nil {
  3738. {
  3739. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3740. if err != nil {
  3741. return 0, err
  3742. }
  3743. i -= size
  3744. i = encodeVarintTypes(dAtA, i, uint64(size))
  3745. }
  3746. i--
  3747. dAtA[i] = 0x72
  3748. }
  3749. return len(dAtA) - i, nil
  3750. }
  3751. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3752. size := m.Size()
  3753. dAtA = make([]byte, size)
  3754. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3755. if err != nil {
  3756. return nil, err
  3757. }
  3758. return dAtA[:n], nil
  3759. }
  3760. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3761. size := m.Size()
  3762. return m.MarshalToSizedBuffer(dAtA[:size])
  3763. }
  3764. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3765. i := len(dAtA)
  3766. _ = i
  3767. var l int
  3768. _ = l
  3769. if len(m.Message) > 0 {
  3770. i -= len(m.Message)
  3771. copy(dAtA[i:], m.Message)
  3772. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3773. i--
  3774. dAtA[i] = 0xa
  3775. }
  3776. return len(dAtA) - i, nil
  3777. }
  3778. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3779. size := m.Size()
  3780. dAtA = make([]byte, size)
  3781. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3782. if err != nil {
  3783. return nil, err
  3784. }
  3785. return dAtA[:n], nil
  3786. }
  3787. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3788. size := m.Size()
  3789. return m.MarshalToSizedBuffer(dAtA[:size])
  3790. }
  3791. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3792. i := len(dAtA)
  3793. _ = i
  3794. var l int
  3795. _ = l
  3796. return len(dAtA) - i, nil
  3797. }
  3798. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3799. size := m.Size()
  3800. dAtA = make([]byte, size)
  3801. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3802. if err != nil {
  3803. return nil, err
  3804. }
  3805. return dAtA[:n], nil
  3806. }
  3807. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3808. size := m.Size()
  3809. return m.MarshalToSizedBuffer(dAtA[:size])
  3810. }
  3811. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3812. i := len(dAtA)
  3813. _ = i
  3814. var l int
  3815. _ = l
  3816. if len(m.AbciVersion) > 0 {
  3817. i -= len(m.AbciVersion)
  3818. copy(dAtA[i:], m.AbciVersion)
  3819. i = encodeVarintTypes(dAtA, i, uint64(len(m.AbciVersion)))
  3820. i--
  3821. dAtA[i] = 0x22
  3822. }
  3823. if m.P2PVersion != 0 {
  3824. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3825. i--
  3826. dAtA[i] = 0x18
  3827. }
  3828. if m.BlockVersion != 0 {
  3829. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3830. i--
  3831. dAtA[i] = 0x10
  3832. }
  3833. if len(m.Version) > 0 {
  3834. i -= len(m.Version)
  3835. copy(dAtA[i:], m.Version)
  3836. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3837. i--
  3838. dAtA[i] = 0xa
  3839. }
  3840. return len(dAtA) - i, nil
  3841. }
  3842. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3843. size := m.Size()
  3844. dAtA = make([]byte, size)
  3845. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3846. if err != nil {
  3847. return nil, err
  3848. }
  3849. return dAtA[:n], nil
  3850. }
  3851. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3852. size := m.Size()
  3853. return m.MarshalToSizedBuffer(dAtA[:size])
  3854. }
  3855. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3856. i := len(dAtA)
  3857. _ = i
  3858. var l int
  3859. _ = l
  3860. if m.InitialHeight != 0 {
  3861. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3862. i--
  3863. dAtA[i] = 0x30
  3864. }
  3865. if len(m.AppStateBytes) > 0 {
  3866. i -= len(m.AppStateBytes)
  3867. copy(dAtA[i:], m.AppStateBytes)
  3868. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3869. i--
  3870. dAtA[i] = 0x2a
  3871. }
  3872. if len(m.Validators) > 0 {
  3873. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3874. {
  3875. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3876. if err != nil {
  3877. return 0, err
  3878. }
  3879. i -= size
  3880. i = encodeVarintTypes(dAtA, i, uint64(size))
  3881. }
  3882. i--
  3883. dAtA[i] = 0x22
  3884. }
  3885. }
  3886. if m.ConsensusParams != nil {
  3887. {
  3888. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3889. if err != nil {
  3890. return 0, err
  3891. }
  3892. i -= size
  3893. i = encodeVarintTypes(dAtA, i, uint64(size))
  3894. }
  3895. i--
  3896. dAtA[i] = 0x1a
  3897. }
  3898. if len(m.ChainId) > 0 {
  3899. i -= len(m.ChainId)
  3900. copy(dAtA[i:], m.ChainId)
  3901. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3902. i--
  3903. dAtA[i] = 0x12
  3904. }
  3905. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3906. if err16 != nil {
  3907. return 0, err16
  3908. }
  3909. i -= n16
  3910. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3911. i--
  3912. dAtA[i] = 0xa
  3913. return len(dAtA) - i, nil
  3914. }
  3915. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3916. size := m.Size()
  3917. dAtA = make([]byte, size)
  3918. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3919. if err != nil {
  3920. return nil, err
  3921. }
  3922. return dAtA[:n], nil
  3923. }
  3924. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3925. size := m.Size()
  3926. return m.MarshalToSizedBuffer(dAtA[:size])
  3927. }
  3928. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3929. i := len(dAtA)
  3930. _ = i
  3931. var l int
  3932. _ = l
  3933. if m.Prove {
  3934. i--
  3935. if m.Prove {
  3936. dAtA[i] = 1
  3937. } else {
  3938. dAtA[i] = 0
  3939. }
  3940. i--
  3941. dAtA[i] = 0x20
  3942. }
  3943. if m.Height != 0 {
  3944. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3945. i--
  3946. dAtA[i] = 0x18
  3947. }
  3948. if len(m.Path) > 0 {
  3949. i -= len(m.Path)
  3950. copy(dAtA[i:], m.Path)
  3951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3952. i--
  3953. dAtA[i] = 0x12
  3954. }
  3955. if len(m.Data) > 0 {
  3956. i -= len(m.Data)
  3957. copy(dAtA[i:], m.Data)
  3958. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3959. i--
  3960. dAtA[i] = 0xa
  3961. }
  3962. return len(dAtA) - i, nil
  3963. }
  3964. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3965. size := m.Size()
  3966. dAtA = make([]byte, size)
  3967. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3968. if err != nil {
  3969. return nil, err
  3970. }
  3971. return dAtA[:n], nil
  3972. }
  3973. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3974. size := m.Size()
  3975. return m.MarshalToSizedBuffer(dAtA[:size])
  3976. }
  3977. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3978. i := len(dAtA)
  3979. _ = i
  3980. var l int
  3981. _ = l
  3982. if len(m.ByzantineValidators) > 0 {
  3983. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3984. {
  3985. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3986. if err != nil {
  3987. return 0, err
  3988. }
  3989. i -= size
  3990. i = encodeVarintTypes(dAtA, i, uint64(size))
  3991. }
  3992. i--
  3993. dAtA[i] = 0x22
  3994. }
  3995. }
  3996. {
  3997. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3998. if err != nil {
  3999. return 0, err
  4000. }
  4001. i -= size
  4002. i = encodeVarintTypes(dAtA, i, uint64(size))
  4003. }
  4004. i--
  4005. dAtA[i] = 0x1a
  4006. {
  4007. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  4008. if err != nil {
  4009. return 0, err
  4010. }
  4011. i -= size
  4012. i = encodeVarintTypes(dAtA, i, uint64(size))
  4013. }
  4014. i--
  4015. dAtA[i] = 0x12
  4016. if len(m.Hash) > 0 {
  4017. i -= len(m.Hash)
  4018. copy(dAtA[i:], m.Hash)
  4019. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  4020. i--
  4021. dAtA[i] = 0xa
  4022. }
  4023. return len(dAtA) - i, nil
  4024. }
  4025. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  4026. size := m.Size()
  4027. dAtA = make([]byte, size)
  4028. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4029. if err != nil {
  4030. return nil, err
  4031. }
  4032. return dAtA[:n], nil
  4033. }
  4034. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4035. size := m.Size()
  4036. return m.MarshalToSizedBuffer(dAtA[:size])
  4037. }
  4038. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4039. i := len(dAtA)
  4040. _ = i
  4041. var l int
  4042. _ = l
  4043. if m.Type != 0 {
  4044. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  4045. i--
  4046. dAtA[i] = 0x10
  4047. }
  4048. if len(m.Tx) > 0 {
  4049. i -= len(m.Tx)
  4050. copy(dAtA[i:], m.Tx)
  4051. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4052. i--
  4053. dAtA[i] = 0xa
  4054. }
  4055. return len(dAtA) - i, nil
  4056. }
  4057. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  4058. size := m.Size()
  4059. dAtA = make([]byte, size)
  4060. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4061. if err != nil {
  4062. return nil, err
  4063. }
  4064. return dAtA[:n], nil
  4065. }
  4066. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4067. size := m.Size()
  4068. return m.MarshalToSizedBuffer(dAtA[:size])
  4069. }
  4070. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4071. i := len(dAtA)
  4072. _ = i
  4073. var l int
  4074. _ = l
  4075. if len(m.Tx) > 0 {
  4076. i -= len(m.Tx)
  4077. copy(dAtA[i:], m.Tx)
  4078. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4079. i--
  4080. dAtA[i] = 0xa
  4081. }
  4082. return len(dAtA) - i, nil
  4083. }
  4084. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  4085. size := m.Size()
  4086. dAtA = make([]byte, size)
  4087. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4088. if err != nil {
  4089. return nil, err
  4090. }
  4091. return dAtA[:n], nil
  4092. }
  4093. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4094. size := m.Size()
  4095. return m.MarshalToSizedBuffer(dAtA[:size])
  4096. }
  4097. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4098. i := len(dAtA)
  4099. _ = i
  4100. var l int
  4101. _ = l
  4102. if m.Height != 0 {
  4103. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4104. i--
  4105. dAtA[i] = 0x8
  4106. }
  4107. return len(dAtA) - i, nil
  4108. }
  4109. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4110. size := m.Size()
  4111. dAtA = make([]byte, size)
  4112. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4113. if err != nil {
  4114. return nil, err
  4115. }
  4116. return dAtA[:n], nil
  4117. }
  4118. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4119. size := m.Size()
  4120. return m.MarshalToSizedBuffer(dAtA[:size])
  4121. }
  4122. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4123. i := len(dAtA)
  4124. _ = i
  4125. var l int
  4126. _ = l
  4127. return len(dAtA) - i, nil
  4128. }
  4129. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4130. size := m.Size()
  4131. dAtA = make([]byte, size)
  4132. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4133. if err != nil {
  4134. return nil, err
  4135. }
  4136. return dAtA[:n], nil
  4137. }
  4138. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4139. size := m.Size()
  4140. return m.MarshalToSizedBuffer(dAtA[:size])
  4141. }
  4142. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4143. i := len(dAtA)
  4144. _ = i
  4145. var l int
  4146. _ = l
  4147. return len(dAtA) - i, nil
  4148. }
  4149. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4150. size := m.Size()
  4151. dAtA = make([]byte, size)
  4152. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4153. if err != nil {
  4154. return nil, err
  4155. }
  4156. return dAtA[:n], nil
  4157. }
  4158. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4159. size := m.Size()
  4160. return m.MarshalToSizedBuffer(dAtA[:size])
  4161. }
  4162. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4163. i := len(dAtA)
  4164. _ = i
  4165. var l int
  4166. _ = l
  4167. if len(m.AppHash) > 0 {
  4168. i -= len(m.AppHash)
  4169. copy(dAtA[i:], m.AppHash)
  4170. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4171. i--
  4172. dAtA[i] = 0x12
  4173. }
  4174. if m.Snapshot != nil {
  4175. {
  4176. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4177. if err != nil {
  4178. return 0, err
  4179. }
  4180. i -= size
  4181. i = encodeVarintTypes(dAtA, i, uint64(size))
  4182. }
  4183. i--
  4184. dAtA[i] = 0xa
  4185. }
  4186. return len(dAtA) - i, nil
  4187. }
  4188. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4189. size := m.Size()
  4190. dAtA = make([]byte, size)
  4191. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4192. if err != nil {
  4193. return nil, err
  4194. }
  4195. return dAtA[:n], nil
  4196. }
  4197. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4198. size := m.Size()
  4199. return m.MarshalToSizedBuffer(dAtA[:size])
  4200. }
  4201. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4202. i := len(dAtA)
  4203. _ = i
  4204. var l int
  4205. _ = l
  4206. if m.Chunk != 0 {
  4207. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4208. i--
  4209. dAtA[i] = 0x18
  4210. }
  4211. if m.Format != 0 {
  4212. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4213. i--
  4214. dAtA[i] = 0x10
  4215. }
  4216. if m.Height != 0 {
  4217. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4218. i--
  4219. dAtA[i] = 0x8
  4220. }
  4221. return len(dAtA) - i, nil
  4222. }
  4223. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4224. size := m.Size()
  4225. dAtA = make([]byte, size)
  4226. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4227. if err != nil {
  4228. return nil, err
  4229. }
  4230. return dAtA[:n], nil
  4231. }
  4232. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4233. size := m.Size()
  4234. return m.MarshalToSizedBuffer(dAtA[:size])
  4235. }
  4236. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4237. i := len(dAtA)
  4238. _ = i
  4239. var l int
  4240. _ = l
  4241. if len(m.Sender) > 0 {
  4242. i -= len(m.Sender)
  4243. copy(dAtA[i:], m.Sender)
  4244. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4245. i--
  4246. dAtA[i] = 0x1a
  4247. }
  4248. if len(m.Chunk) > 0 {
  4249. i -= len(m.Chunk)
  4250. copy(dAtA[i:], m.Chunk)
  4251. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4252. i--
  4253. dAtA[i] = 0x12
  4254. }
  4255. if m.Index != 0 {
  4256. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4257. i--
  4258. dAtA[i] = 0x8
  4259. }
  4260. return len(dAtA) - i, nil
  4261. }
  4262. func (m *Response) Marshal() (dAtA []byte, err error) {
  4263. size := m.Size()
  4264. dAtA = make([]byte, size)
  4265. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4266. if err != nil {
  4267. return nil, err
  4268. }
  4269. return dAtA[:n], nil
  4270. }
  4271. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4272. size := m.Size()
  4273. return m.MarshalToSizedBuffer(dAtA[:size])
  4274. }
  4275. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4276. i := len(dAtA)
  4277. _ = i
  4278. var l int
  4279. _ = l
  4280. if m.Value != nil {
  4281. {
  4282. size := m.Value.Size()
  4283. i -= size
  4284. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4285. return 0, err
  4286. }
  4287. }
  4288. }
  4289. return len(dAtA) - i, nil
  4290. }
  4291. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4292. size := m.Size()
  4293. return m.MarshalToSizedBuffer(dAtA[:size])
  4294. }
  4295. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4296. i := len(dAtA)
  4297. if m.Exception != nil {
  4298. {
  4299. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4300. if err != nil {
  4301. return 0, err
  4302. }
  4303. i -= size
  4304. i = encodeVarintTypes(dAtA, i, uint64(size))
  4305. }
  4306. i--
  4307. dAtA[i] = 0xa
  4308. }
  4309. return len(dAtA) - i, nil
  4310. }
  4311. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4312. size := m.Size()
  4313. return m.MarshalToSizedBuffer(dAtA[:size])
  4314. }
  4315. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4316. i := len(dAtA)
  4317. if m.Echo != nil {
  4318. {
  4319. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4320. if err != nil {
  4321. return 0, err
  4322. }
  4323. i -= size
  4324. i = encodeVarintTypes(dAtA, i, uint64(size))
  4325. }
  4326. i--
  4327. dAtA[i] = 0x12
  4328. }
  4329. return len(dAtA) - i, nil
  4330. }
  4331. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4332. size := m.Size()
  4333. return m.MarshalToSizedBuffer(dAtA[:size])
  4334. }
  4335. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4336. i := len(dAtA)
  4337. if m.Flush != nil {
  4338. {
  4339. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4340. if err != nil {
  4341. return 0, err
  4342. }
  4343. i -= size
  4344. i = encodeVarintTypes(dAtA, i, uint64(size))
  4345. }
  4346. i--
  4347. dAtA[i] = 0x1a
  4348. }
  4349. return len(dAtA) - i, nil
  4350. }
  4351. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4352. size := m.Size()
  4353. return m.MarshalToSizedBuffer(dAtA[:size])
  4354. }
  4355. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4356. i := len(dAtA)
  4357. if m.Info != nil {
  4358. {
  4359. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4360. if err != nil {
  4361. return 0, err
  4362. }
  4363. i -= size
  4364. i = encodeVarintTypes(dAtA, i, uint64(size))
  4365. }
  4366. i--
  4367. dAtA[i] = 0x22
  4368. }
  4369. return len(dAtA) - i, nil
  4370. }
  4371. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4372. size := m.Size()
  4373. return m.MarshalToSizedBuffer(dAtA[:size])
  4374. }
  4375. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4376. i := len(dAtA)
  4377. if m.InitChain != nil {
  4378. {
  4379. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4380. if err != nil {
  4381. return 0, err
  4382. }
  4383. i -= size
  4384. i = encodeVarintTypes(dAtA, i, uint64(size))
  4385. }
  4386. i--
  4387. dAtA[i] = 0x2a
  4388. }
  4389. return len(dAtA) - i, nil
  4390. }
  4391. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4392. size := m.Size()
  4393. return m.MarshalToSizedBuffer(dAtA[:size])
  4394. }
  4395. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4396. i := len(dAtA)
  4397. if m.Query != nil {
  4398. {
  4399. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4400. if err != nil {
  4401. return 0, err
  4402. }
  4403. i -= size
  4404. i = encodeVarintTypes(dAtA, i, uint64(size))
  4405. }
  4406. i--
  4407. dAtA[i] = 0x32
  4408. }
  4409. return len(dAtA) - i, nil
  4410. }
  4411. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4412. size := m.Size()
  4413. return m.MarshalToSizedBuffer(dAtA[:size])
  4414. }
  4415. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4416. i := len(dAtA)
  4417. if m.BeginBlock != nil {
  4418. {
  4419. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4420. if err != nil {
  4421. return 0, err
  4422. }
  4423. i -= size
  4424. i = encodeVarintTypes(dAtA, i, uint64(size))
  4425. }
  4426. i--
  4427. dAtA[i] = 0x3a
  4428. }
  4429. return len(dAtA) - i, nil
  4430. }
  4431. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4432. size := m.Size()
  4433. return m.MarshalToSizedBuffer(dAtA[:size])
  4434. }
  4435. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4436. i := len(dAtA)
  4437. if m.CheckTx != nil {
  4438. {
  4439. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4440. if err != nil {
  4441. return 0, err
  4442. }
  4443. i -= size
  4444. i = encodeVarintTypes(dAtA, i, uint64(size))
  4445. }
  4446. i--
  4447. dAtA[i] = 0x42
  4448. }
  4449. return len(dAtA) - i, nil
  4450. }
  4451. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4452. size := m.Size()
  4453. return m.MarshalToSizedBuffer(dAtA[:size])
  4454. }
  4455. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4456. i := len(dAtA)
  4457. if m.DeliverTx != nil {
  4458. {
  4459. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4460. if err != nil {
  4461. return 0, err
  4462. }
  4463. i -= size
  4464. i = encodeVarintTypes(dAtA, i, uint64(size))
  4465. }
  4466. i--
  4467. dAtA[i] = 0x4a
  4468. }
  4469. return len(dAtA) - i, nil
  4470. }
  4471. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4472. size := m.Size()
  4473. return m.MarshalToSizedBuffer(dAtA[:size])
  4474. }
  4475. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4476. i := len(dAtA)
  4477. if m.EndBlock != nil {
  4478. {
  4479. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4480. if err != nil {
  4481. return 0, err
  4482. }
  4483. i -= size
  4484. i = encodeVarintTypes(dAtA, i, uint64(size))
  4485. }
  4486. i--
  4487. dAtA[i] = 0x52
  4488. }
  4489. return len(dAtA) - i, nil
  4490. }
  4491. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4492. size := m.Size()
  4493. return m.MarshalToSizedBuffer(dAtA[:size])
  4494. }
  4495. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4496. i := len(dAtA)
  4497. if m.Commit != nil {
  4498. {
  4499. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4500. if err != nil {
  4501. return 0, err
  4502. }
  4503. i -= size
  4504. i = encodeVarintTypes(dAtA, i, uint64(size))
  4505. }
  4506. i--
  4507. dAtA[i] = 0x5a
  4508. }
  4509. return len(dAtA) - i, nil
  4510. }
  4511. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4512. size := m.Size()
  4513. return m.MarshalToSizedBuffer(dAtA[:size])
  4514. }
  4515. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4516. i := len(dAtA)
  4517. if m.ListSnapshots != nil {
  4518. {
  4519. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4520. if err != nil {
  4521. return 0, err
  4522. }
  4523. i -= size
  4524. i = encodeVarintTypes(dAtA, i, uint64(size))
  4525. }
  4526. i--
  4527. dAtA[i] = 0x62
  4528. }
  4529. return len(dAtA) - i, nil
  4530. }
  4531. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4532. size := m.Size()
  4533. return m.MarshalToSizedBuffer(dAtA[:size])
  4534. }
  4535. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4536. i := len(dAtA)
  4537. if m.OfferSnapshot != nil {
  4538. {
  4539. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4540. if err != nil {
  4541. return 0, err
  4542. }
  4543. i -= size
  4544. i = encodeVarintTypes(dAtA, i, uint64(size))
  4545. }
  4546. i--
  4547. dAtA[i] = 0x6a
  4548. }
  4549. return len(dAtA) - i, nil
  4550. }
  4551. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4552. size := m.Size()
  4553. return m.MarshalToSizedBuffer(dAtA[:size])
  4554. }
  4555. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4556. i := len(dAtA)
  4557. if m.LoadSnapshotChunk != nil {
  4558. {
  4559. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4560. if err != nil {
  4561. return 0, err
  4562. }
  4563. i -= size
  4564. i = encodeVarintTypes(dAtA, i, uint64(size))
  4565. }
  4566. i--
  4567. dAtA[i] = 0x72
  4568. }
  4569. return len(dAtA) - i, nil
  4570. }
  4571. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4572. size := m.Size()
  4573. return m.MarshalToSizedBuffer(dAtA[:size])
  4574. }
  4575. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4576. i := len(dAtA)
  4577. if m.ApplySnapshotChunk != nil {
  4578. {
  4579. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4580. if err != nil {
  4581. return 0, err
  4582. }
  4583. i -= size
  4584. i = encodeVarintTypes(dAtA, i, uint64(size))
  4585. }
  4586. i--
  4587. dAtA[i] = 0x7a
  4588. }
  4589. return len(dAtA) - i, nil
  4590. }
  4591. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4592. size := m.Size()
  4593. dAtA = make([]byte, size)
  4594. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4595. if err != nil {
  4596. return nil, err
  4597. }
  4598. return dAtA[:n], nil
  4599. }
  4600. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4601. size := m.Size()
  4602. return m.MarshalToSizedBuffer(dAtA[:size])
  4603. }
  4604. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4605. i := len(dAtA)
  4606. _ = i
  4607. var l int
  4608. _ = l
  4609. if len(m.Error) > 0 {
  4610. i -= len(m.Error)
  4611. copy(dAtA[i:], m.Error)
  4612. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4613. i--
  4614. dAtA[i] = 0xa
  4615. }
  4616. return len(dAtA) - i, nil
  4617. }
  4618. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4619. size := m.Size()
  4620. dAtA = make([]byte, size)
  4621. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4622. if err != nil {
  4623. return nil, err
  4624. }
  4625. return dAtA[:n], nil
  4626. }
  4627. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4628. size := m.Size()
  4629. return m.MarshalToSizedBuffer(dAtA[:size])
  4630. }
  4631. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4632. i := len(dAtA)
  4633. _ = i
  4634. var l int
  4635. _ = l
  4636. if len(m.Message) > 0 {
  4637. i -= len(m.Message)
  4638. copy(dAtA[i:], m.Message)
  4639. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4640. i--
  4641. dAtA[i] = 0xa
  4642. }
  4643. return len(dAtA) - i, nil
  4644. }
  4645. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4646. size := m.Size()
  4647. dAtA = make([]byte, size)
  4648. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4649. if err != nil {
  4650. return nil, err
  4651. }
  4652. return dAtA[:n], nil
  4653. }
  4654. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4655. size := m.Size()
  4656. return m.MarshalToSizedBuffer(dAtA[:size])
  4657. }
  4658. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4659. i := len(dAtA)
  4660. _ = i
  4661. var l int
  4662. _ = l
  4663. return len(dAtA) - i, nil
  4664. }
  4665. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4666. size := m.Size()
  4667. dAtA = make([]byte, size)
  4668. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4669. if err != nil {
  4670. return nil, err
  4671. }
  4672. return dAtA[:n], nil
  4673. }
  4674. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4675. size := m.Size()
  4676. return m.MarshalToSizedBuffer(dAtA[:size])
  4677. }
  4678. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4679. i := len(dAtA)
  4680. _ = i
  4681. var l int
  4682. _ = l
  4683. if len(m.LastBlockAppHash) > 0 {
  4684. i -= len(m.LastBlockAppHash)
  4685. copy(dAtA[i:], m.LastBlockAppHash)
  4686. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4687. i--
  4688. dAtA[i] = 0x2a
  4689. }
  4690. if m.LastBlockHeight != 0 {
  4691. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4692. i--
  4693. dAtA[i] = 0x20
  4694. }
  4695. if m.AppVersion != 0 {
  4696. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4697. i--
  4698. dAtA[i] = 0x18
  4699. }
  4700. if len(m.Version) > 0 {
  4701. i -= len(m.Version)
  4702. copy(dAtA[i:], m.Version)
  4703. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4704. i--
  4705. dAtA[i] = 0x12
  4706. }
  4707. if len(m.Data) > 0 {
  4708. i -= len(m.Data)
  4709. copy(dAtA[i:], m.Data)
  4710. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4711. i--
  4712. dAtA[i] = 0xa
  4713. }
  4714. return len(dAtA) - i, nil
  4715. }
  4716. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4717. size := m.Size()
  4718. dAtA = make([]byte, size)
  4719. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4720. if err != nil {
  4721. return nil, err
  4722. }
  4723. return dAtA[:n], nil
  4724. }
  4725. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4726. size := m.Size()
  4727. return m.MarshalToSizedBuffer(dAtA[:size])
  4728. }
  4729. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4730. i := len(dAtA)
  4731. _ = i
  4732. var l int
  4733. _ = l
  4734. if len(m.AppHash) > 0 {
  4735. i -= len(m.AppHash)
  4736. copy(dAtA[i:], m.AppHash)
  4737. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4738. i--
  4739. dAtA[i] = 0x1a
  4740. }
  4741. if len(m.Validators) > 0 {
  4742. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4743. {
  4744. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4745. if err != nil {
  4746. return 0, err
  4747. }
  4748. i -= size
  4749. i = encodeVarintTypes(dAtA, i, uint64(size))
  4750. }
  4751. i--
  4752. dAtA[i] = 0x12
  4753. }
  4754. }
  4755. if m.ConsensusParams != nil {
  4756. {
  4757. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4758. if err != nil {
  4759. return 0, err
  4760. }
  4761. i -= size
  4762. i = encodeVarintTypes(dAtA, i, uint64(size))
  4763. }
  4764. i--
  4765. dAtA[i] = 0xa
  4766. }
  4767. return len(dAtA) - i, nil
  4768. }
  4769. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4770. size := m.Size()
  4771. dAtA = make([]byte, size)
  4772. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4773. if err != nil {
  4774. return nil, err
  4775. }
  4776. return dAtA[:n], nil
  4777. }
  4778. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4779. size := m.Size()
  4780. return m.MarshalToSizedBuffer(dAtA[:size])
  4781. }
  4782. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4783. i := len(dAtA)
  4784. _ = i
  4785. var l int
  4786. _ = l
  4787. if len(m.Codespace) > 0 {
  4788. i -= len(m.Codespace)
  4789. copy(dAtA[i:], m.Codespace)
  4790. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4791. i--
  4792. dAtA[i] = 0x52
  4793. }
  4794. if m.Height != 0 {
  4795. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4796. i--
  4797. dAtA[i] = 0x48
  4798. }
  4799. if m.ProofOps != nil {
  4800. {
  4801. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4802. if err != nil {
  4803. return 0, err
  4804. }
  4805. i -= size
  4806. i = encodeVarintTypes(dAtA, i, uint64(size))
  4807. }
  4808. i--
  4809. dAtA[i] = 0x42
  4810. }
  4811. if len(m.Value) > 0 {
  4812. i -= len(m.Value)
  4813. copy(dAtA[i:], m.Value)
  4814. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4815. i--
  4816. dAtA[i] = 0x3a
  4817. }
  4818. if len(m.Key) > 0 {
  4819. i -= len(m.Key)
  4820. copy(dAtA[i:], m.Key)
  4821. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4822. i--
  4823. dAtA[i] = 0x32
  4824. }
  4825. if m.Index != 0 {
  4826. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4827. i--
  4828. dAtA[i] = 0x28
  4829. }
  4830. if len(m.Info) > 0 {
  4831. i -= len(m.Info)
  4832. copy(dAtA[i:], m.Info)
  4833. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4834. i--
  4835. dAtA[i] = 0x22
  4836. }
  4837. if len(m.Log) > 0 {
  4838. i -= len(m.Log)
  4839. copy(dAtA[i:], m.Log)
  4840. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4841. i--
  4842. dAtA[i] = 0x1a
  4843. }
  4844. if m.Code != 0 {
  4845. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4846. i--
  4847. dAtA[i] = 0x8
  4848. }
  4849. return len(dAtA) - i, nil
  4850. }
  4851. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4852. size := m.Size()
  4853. dAtA = make([]byte, size)
  4854. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4855. if err != nil {
  4856. return nil, err
  4857. }
  4858. return dAtA[:n], nil
  4859. }
  4860. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4861. size := m.Size()
  4862. return m.MarshalToSizedBuffer(dAtA[:size])
  4863. }
  4864. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4865. i := len(dAtA)
  4866. _ = i
  4867. var l int
  4868. _ = l
  4869. if len(m.Events) > 0 {
  4870. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4871. {
  4872. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4873. if err != nil {
  4874. return 0, err
  4875. }
  4876. i -= size
  4877. i = encodeVarintTypes(dAtA, i, uint64(size))
  4878. }
  4879. i--
  4880. dAtA[i] = 0xa
  4881. }
  4882. }
  4883. return len(dAtA) - i, nil
  4884. }
  4885. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  4886. size := m.Size()
  4887. dAtA = make([]byte, size)
  4888. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4889. if err != nil {
  4890. return nil, err
  4891. }
  4892. return dAtA[:n], nil
  4893. }
  4894. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4895. size := m.Size()
  4896. return m.MarshalToSizedBuffer(dAtA[:size])
  4897. }
  4898. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4899. i := len(dAtA)
  4900. _ = i
  4901. var l int
  4902. _ = l
  4903. if len(m.Codespace) > 0 {
  4904. i -= len(m.Codespace)
  4905. copy(dAtA[i:], m.Codespace)
  4906. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4907. i--
  4908. dAtA[i] = 0x42
  4909. }
  4910. if len(m.Events) > 0 {
  4911. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4912. {
  4913. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4914. if err != nil {
  4915. return 0, err
  4916. }
  4917. i -= size
  4918. i = encodeVarintTypes(dAtA, i, uint64(size))
  4919. }
  4920. i--
  4921. dAtA[i] = 0x3a
  4922. }
  4923. }
  4924. if m.GasUsed != 0 {
  4925. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4926. i--
  4927. dAtA[i] = 0x30
  4928. }
  4929. if m.GasWanted != 0 {
  4930. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4931. i--
  4932. dAtA[i] = 0x28
  4933. }
  4934. if len(m.Info) > 0 {
  4935. i -= len(m.Info)
  4936. copy(dAtA[i:], m.Info)
  4937. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4938. i--
  4939. dAtA[i] = 0x22
  4940. }
  4941. if len(m.Log) > 0 {
  4942. i -= len(m.Log)
  4943. copy(dAtA[i:], m.Log)
  4944. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4945. i--
  4946. dAtA[i] = 0x1a
  4947. }
  4948. if len(m.Data) > 0 {
  4949. i -= len(m.Data)
  4950. copy(dAtA[i:], m.Data)
  4951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4952. i--
  4953. dAtA[i] = 0x12
  4954. }
  4955. if m.Code != 0 {
  4956. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4957. i--
  4958. dAtA[i] = 0x8
  4959. }
  4960. return len(dAtA) - i, nil
  4961. }
  4962. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  4963. size := m.Size()
  4964. dAtA = make([]byte, size)
  4965. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4966. if err != nil {
  4967. return nil, err
  4968. }
  4969. return dAtA[:n], nil
  4970. }
  4971. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4972. size := m.Size()
  4973. return m.MarshalToSizedBuffer(dAtA[:size])
  4974. }
  4975. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4976. i := len(dAtA)
  4977. _ = i
  4978. var l int
  4979. _ = l
  4980. if len(m.Codespace) > 0 {
  4981. i -= len(m.Codespace)
  4982. copy(dAtA[i:], m.Codespace)
  4983. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4984. i--
  4985. dAtA[i] = 0x42
  4986. }
  4987. if len(m.Events) > 0 {
  4988. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4989. {
  4990. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4991. if err != nil {
  4992. return 0, err
  4993. }
  4994. i -= size
  4995. i = encodeVarintTypes(dAtA, i, uint64(size))
  4996. }
  4997. i--
  4998. dAtA[i] = 0x3a
  4999. }
  5000. }
  5001. if m.GasUsed != 0 {
  5002. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  5003. i--
  5004. dAtA[i] = 0x30
  5005. }
  5006. if m.GasWanted != 0 {
  5007. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  5008. i--
  5009. dAtA[i] = 0x28
  5010. }
  5011. if len(m.Info) > 0 {
  5012. i -= len(m.Info)
  5013. copy(dAtA[i:], m.Info)
  5014. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  5015. i--
  5016. dAtA[i] = 0x22
  5017. }
  5018. if len(m.Log) > 0 {
  5019. i -= len(m.Log)
  5020. copy(dAtA[i:], m.Log)
  5021. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5022. i--
  5023. dAtA[i] = 0x1a
  5024. }
  5025. if len(m.Data) > 0 {
  5026. i -= len(m.Data)
  5027. copy(dAtA[i:], m.Data)
  5028. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5029. i--
  5030. dAtA[i] = 0x12
  5031. }
  5032. if m.Code != 0 {
  5033. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5034. i--
  5035. dAtA[i] = 0x8
  5036. }
  5037. return len(dAtA) - i, nil
  5038. }
  5039. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  5040. size := m.Size()
  5041. dAtA = make([]byte, size)
  5042. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5043. if err != nil {
  5044. return nil, err
  5045. }
  5046. return dAtA[:n], nil
  5047. }
  5048. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  5049. size := m.Size()
  5050. return m.MarshalToSizedBuffer(dAtA[:size])
  5051. }
  5052. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5053. i := len(dAtA)
  5054. _ = i
  5055. var l int
  5056. _ = l
  5057. if len(m.Events) > 0 {
  5058. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5059. {
  5060. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5061. if err != nil {
  5062. return 0, err
  5063. }
  5064. i -= size
  5065. i = encodeVarintTypes(dAtA, i, uint64(size))
  5066. }
  5067. i--
  5068. dAtA[i] = 0x1a
  5069. }
  5070. }
  5071. if m.ConsensusParamUpdates != nil {
  5072. {
  5073. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  5074. if err != nil {
  5075. return 0, err
  5076. }
  5077. i -= size
  5078. i = encodeVarintTypes(dAtA, i, uint64(size))
  5079. }
  5080. i--
  5081. dAtA[i] = 0x12
  5082. }
  5083. if len(m.ValidatorUpdates) > 0 {
  5084. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5085. {
  5086. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5087. if err != nil {
  5088. return 0, err
  5089. }
  5090. i -= size
  5091. i = encodeVarintTypes(dAtA, i, uint64(size))
  5092. }
  5093. i--
  5094. dAtA[i] = 0xa
  5095. }
  5096. }
  5097. return len(dAtA) - i, nil
  5098. }
  5099. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5100. size := m.Size()
  5101. dAtA = make([]byte, size)
  5102. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5103. if err != nil {
  5104. return nil, err
  5105. }
  5106. return dAtA[:n], nil
  5107. }
  5108. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5109. size := m.Size()
  5110. return m.MarshalToSizedBuffer(dAtA[:size])
  5111. }
  5112. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5113. i := len(dAtA)
  5114. _ = i
  5115. var l int
  5116. _ = l
  5117. if m.RetainHeight != 0 {
  5118. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5119. i--
  5120. dAtA[i] = 0x18
  5121. }
  5122. if len(m.Data) > 0 {
  5123. i -= len(m.Data)
  5124. copy(dAtA[i:], m.Data)
  5125. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5126. i--
  5127. dAtA[i] = 0x12
  5128. }
  5129. return len(dAtA) - i, nil
  5130. }
  5131. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5132. size := m.Size()
  5133. dAtA = make([]byte, size)
  5134. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5135. if err != nil {
  5136. return nil, err
  5137. }
  5138. return dAtA[:n], nil
  5139. }
  5140. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5141. size := m.Size()
  5142. return m.MarshalToSizedBuffer(dAtA[:size])
  5143. }
  5144. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5145. i := len(dAtA)
  5146. _ = i
  5147. var l int
  5148. _ = l
  5149. if len(m.Snapshots) > 0 {
  5150. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5151. {
  5152. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5153. if err != nil {
  5154. return 0, err
  5155. }
  5156. i -= size
  5157. i = encodeVarintTypes(dAtA, i, uint64(size))
  5158. }
  5159. i--
  5160. dAtA[i] = 0xa
  5161. }
  5162. }
  5163. return len(dAtA) - i, nil
  5164. }
  5165. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5166. size := m.Size()
  5167. dAtA = make([]byte, size)
  5168. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5169. if err != nil {
  5170. return nil, err
  5171. }
  5172. return dAtA[:n], nil
  5173. }
  5174. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5175. size := m.Size()
  5176. return m.MarshalToSizedBuffer(dAtA[:size])
  5177. }
  5178. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5179. i := len(dAtA)
  5180. _ = i
  5181. var l int
  5182. _ = l
  5183. if m.Result != 0 {
  5184. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5185. i--
  5186. dAtA[i] = 0x8
  5187. }
  5188. return len(dAtA) - i, nil
  5189. }
  5190. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5191. size := m.Size()
  5192. dAtA = make([]byte, size)
  5193. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5194. if err != nil {
  5195. return nil, err
  5196. }
  5197. return dAtA[:n], nil
  5198. }
  5199. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5200. size := m.Size()
  5201. return m.MarshalToSizedBuffer(dAtA[:size])
  5202. }
  5203. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5204. i := len(dAtA)
  5205. _ = i
  5206. var l int
  5207. _ = l
  5208. if len(m.Chunk) > 0 {
  5209. i -= len(m.Chunk)
  5210. copy(dAtA[i:], m.Chunk)
  5211. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5212. i--
  5213. dAtA[i] = 0xa
  5214. }
  5215. return len(dAtA) - i, nil
  5216. }
  5217. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5218. size := m.Size()
  5219. dAtA = make([]byte, size)
  5220. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5221. if err != nil {
  5222. return nil, err
  5223. }
  5224. return dAtA[:n], nil
  5225. }
  5226. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5227. size := m.Size()
  5228. return m.MarshalToSizedBuffer(dAtA[:size])
  5229. }
  5230. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5231. i := len(dAtA)
  5232. _ = i
  5233. var l int
  5234. _ = l
  5235. if len(m.RejectSenders) > 0 {
  5236. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5237. i -= len(m.RejectSenders[iNdEx])
  5238. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5239. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5240. i--
  5241. dAtA[i] = 0x1a
  5242. }
  5243. }
  5244. if len(m.RefetchChunks) > 0 {
  5245. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5246. var j38 int
  5247. for _, num := range m.RefetchChunks {
  5248. for num >= 1<<7 {
  5249. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5250. num >>= 7
  5251. j38++
  5252. }
  5253. dAtA39[j38] = uint8(num)
  5254. j38++
  5255. }
  5256. i -= j38
  5257. copy(dAtA[i:], dAtA39[:j38])
  5258. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5259. i--
  5260. dAtA[i] = 0x12
  5261. }
  5262. if m.Result != 0 {
  5263. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5264. i--
  5265. dAtA[i] = 0x8
  5266. }
  5267. return len(dAtA) - i, nil
  5268. }
  5269. func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
  5270. size := m.Size()
  5271. dAtA = make([]byte, size)
  5272. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5273. if err != nil {
  5274. return nil, err
  5275. }
  5276. return dAtA[:n], nil
  5277. }
  5278. func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
  5279. size := m.Size()
  5280. return m.MarshalToSizedBuffer(dAtA[:size])
  5281. }
  5282. func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5283. i := len(dAtA)
  5284. _ = i
  5285. var l int
  5286. _ = l
  5287. if m.Version != nil {
  5288. {
  5289. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  5290. if err != nil {
  5291. return 0, err
  5292. }
  5293. i -= size
  5294. i = encodeVarintTypes(dAtA, i, uint64(size))
  5295. }
  5296. i--
  5297. dAtA[i] = 0x22
  5298. }
  5299. if m.Validator != nil {
  5300. {
  5301. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5302. if err != nil {
  5303. return 0, err
  5304. }
  5305. i -= size
  5306. i = encodeVarintTypes(dAtA, i, uint64(size))
  5307. }
  5308. i--
  5309. dAtA[i] = 0x1a
  5310. }
  5311. if m.Evidence != nil {
  5312. {
  5313. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  5314. if err != nil {
  5315. return 0, err
  5316. }
  5317. i -= size
  5318. i = encodeVarintTypes(dAtA, i, uint64(size))
  5319. }
  5320. i--
  5321. dAtA[i] = 0x12
  5322. }
  5323. if m.Block != nil {
  5324. {
  5325. size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
  5326. if err != nil {
  5327. return 0, err
  5328. }
  5329. i -= size
  5330. i = encodeVarintTypes(dAtA, i, uint64(size))
  5331. }
  5332. i--
  5333. dAtA[i] = 0xa
  5334. }
  5335. return len(dAtA) - i, nil
  5336. }
  5337. func (m *BlockParams) Marshal() (dAtA []byte, err error) {
  5338. size := m.Size()
  5339. dAtA = make([]byte, size)
  5340. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5341. if err != nil {
  5342. return nil, err
  5343. }
  5344. return dAtA[:n], nil
  5345. }
  5346. func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) {
  5347. size := m.Size()
  5348. return m.MarshalToSizedBuffer(dAtA[:size])
  5349. }
  5350. func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5351. i := len(dAtA)
  5352. _ = i
  5353. var l int
  5354. _ = l
  5355. if m.MaxGas != 0 {
  5356. i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas))
  5357. i--
  5358. dAtA[i] = 0x10
  5359. }
  5360. if m.MaxBytes != 0 {
  5361. i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes))
  5362. i--
  5363. dAtA[i] = 0x8
  5364. }
  5365. return len(dAtA) - i, nil
  5366. }
  5367. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5368. size := m.Size()
  5369. dAtA = make([]byte, size)
  5370. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5371. if err != nil {
  5372. return nil, err
  5373. }
  5374. return dAtA[:n], nil
  5375. }
  5376. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5377. size := m.Size()
  5378. return m.MarshalToSizedBuffer(dAtA[:size])
  5379. }
  5380. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5381. i := len(dAtA)
  5382. _ = i
  5383. var l int
  5384. _ = l
  5385. if len(m.Votes) > 0 {
  5386. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5387. {
  5388. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5389. if err != nil {
  5390. return 0, err
  5391. }
  5392. i -= size
  5393. i = encodeVarintTypes(dAtA, i, uint64(size))
  5394. }
  5395. i--
  5396. dAtA[i] = 0x12
  5397. }
  5398. }
  5399. if m.Round != 0 {
  5400. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5401. i--
  5402. dAtA[i] = 0x8
  5403. }
  5404. return len(dAtA) - i, nil
  5405. }
  5406. func (m *Event) Marshal() (dAtA []byte, err error) {
  5407. size := m.Size()
  5408. dAtA = make([]byte, size)
  5409. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5410. if err != nil {
  5411. return nil, err
  5412. }
  5413. return dAtA[:n], nil
  5414. }
  5415. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5416. size := m.Size()
  5417. return m.MarshalToSizedBuffer(dAtA[:size])
  5418. }
  5419. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5420. i := len(dAtA)
  5421. _ = i
  5422. var l int
  5423. _ = l
  5424. if len(m.Attributes) > 0 {
  5425. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5426. {
  5427. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5428. if err != nil {
  5429. return 0, err
  5430. }
  5431. i -= size
  5432. i = encodeVarintTypes(dAtA, i, uint64(size))
  5433. }
  5434. i--
  5435. dAtA[i] = 0x12
  5436. }
  5437. }
  5438. if len(m.Type) > 0 {
  5439. i -= len(m.Type)
  5440. copy(dAtA[i:], m.Type)
  5441. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5442. i--
  5443. dAtA[i] = 0xa
  5444. }
  5445. return len(dAtA) - i, nil
  5446. }
  5447. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5448. size := m.Size()
  5449. dAtA = make([]byte, size)
  5450. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5451. if err != nil {
  5452. return nil, err
  5453. }
  5454. return dAtA[:n], nil
  5455. }
  5456. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5457. size := m.Size()
  5458. return m.MarshalToSizedBuffer(dAtA[:size])
  5459. }
  5460. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5461. i := len(dAtA)
  5462. _ = i
  5463. var l int
  5464. _ = l
  5465. if m.Index {
  5466. i--
  5467. if m.Index {
  5468. dAtA[i] = 1
  5469. } else {
  5470. dAtA[i] = 0
  5471. }
  5472. i--
  5473. dAtA[i] = 0x18
  5474. }
  5475. if len(m.Value) > 0 {
  5476. i -= len(m.Value)
  5477. copy(dAtA[i:], m.Value)
  5478. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5479. i--
  5480. dAtA[i] = 0x12
  5481. }
  5482. if len(m.Key) > 0 {
  5483. i -= len(m.Key)
  5484. copy(dAtA[i:], m.Key)
  5485. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5486. i--
  5487. dAtA[i] = 0xa
  5488. }
  5489. return len(dAtA) - i, nil
  5490. }
  5491. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5492. size := m.Size()
  5493. dAtA = make([]byte, size)
  5494. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5495. if err != nil {
  5496. return nil, err
  5497. }
  5498. return dAtA[:n], nil
  5499. }
  5500. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5501. size := m.Size()
  5502. return m.MarshalToSizedBuffer(dAtA[:size])
  5503. }
  5504. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5505. i := len(dAtA)
  5506. _ = i
  5507. var l int
  5508. _ = l
  5509. {
  5510. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5511. if err != nil {
  5512. return 0, err
  5513. }
  5514. i -= size
  5515. i = encodeVarintTypes(dAtA, i, uint64(size))
  5516. }
  5517. i--
  5518. dAtA[i] = 0x22
  5519. if len(m.Tx) > 0 {
  5520. i -= len(m.Tx)
  5521. copy(dAtA[i:], m.Tx)
  5522. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5523. i--
  5524. dAtA[i] = 0x1a
  5525. }
  5526. if m.Index != 0 {
  5527. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5528. i--
  5529. dAtA[i] = 0x10
  5530. }
  5531. if m.Height != 0 {
  5532. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5533. i--
  5534. dAtA[i] = 0x8
  5535. }
  5536. return len(dAtA) - i, nil
  5537. }
  5538. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5539. size := m.Size()
  5540. dAtA = make([]byte, size)
  5541. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5542. if err != nil {
  5543. return nil, err
  5544. }
  5545. return dAtA[:n], nil
  5546. }
  5547. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5548. size := m.Size()
  5549. return m.MarshalToSizedBuffer(dAtA[:size])
  5550. }
  5551. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5552. i := len(dAtA)
  5553. _ = i
  5554. var l int
  5555. _ = l
  5556. if m.Power != 0 {
  5557. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5558. i--
  5559. dAtA[i] = 0x18
  5560. }
  5561. if len(m.Address) > 0 {
  5562. i -= len(m.Address)
  5563. copy(dAtA[i:], m.Address)
  5564. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5565. i--
  5566. dAtA[i] = 0xa
  5567. }
  5568. return len(dAtA) - i, nil
  5569. }
  5570. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5571. size := m.Size()
  5572. dAtA = make([]byte, size)
  5573. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5574. if err != nil {
  5575. return nil, err
  5576. }
  5577. return dAtA[:n], nil
  5578. }
  5579. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5580. size := m.Size()
  5581. return m.MarshalToSizedBuffer(dAtA[:size])
  5582. }
  5583. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5584. i := len(dAtA)
  5585. _ = i
  5586. var l int
  5587. _ = l
  5588. if m.Power != 0 {
  5589. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5590. i--
  5591. dAtA[i] = 0x10
  5592. }
  5593. {
  5594. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5595. if err != nil {
  5596. return 0, err
  5597. }
  5598. i -= size
  5599. i = encodeVarintTypes(dAtA, i, uint64(size))
  5600. }
  5601. i--
  5602. dAtA[i] = 0xa
  5603. return len(dAtA) - i, nil
  5604. }
  5605. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5606. size := m.Size()
  5607. dAtA = make([]byte, size)
  5608. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5609. if err != nil {
  5610. return nil, err
  5611. }
  5612. return dAtA[:n], nil
  5613. }
  5614. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5615. size := m.Size()
  5616. return m.MarshalToSizedBuffer(dAtA[:size])
  5617. }
  5618. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5619. i := len(dAtA)
  5620. _ = i
  5621. var l int
  5622. _ = l
  5623. if m.SignedLastBlock {
  5624. i--
  5625. if m.SignedLastBlock {
  5626. dAtA[i] = 1
  5627. } else {
  5628. dAtA[i] = 0
  5629. }
  5630. i--
  5631. dAtA[i] = 0x10
  5632. }
  5633. {
  5634. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5635. if err != nil {
  5636. return 0, err
  5637. }
  5638. i -= size
  5639. i = encodeVarintTypes(dAtA, i, uint64(size))
  5640. }
  5641. i--
  5642. dAtA[i] = 0xa
  5643. return len(dAtA) - i, nil
  5644. }
  5645. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5646. size := m.Size()
  5647. dAtA = make([]byte, size)
  5648. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5649. if err != nil {
  5650. return nil, err
  5651. }
  5652. return dAtA[:n], nil
  5653. }
  5654. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5655. size := m.Size()
  5656. return m.MarshalToSizedBuffer(dAtA[:size])
  5657. }
  5658. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5659. i := len(dAtA)
  5660. _ = i
  5661. var l int
  5662. _ = l
  5663. if m.TotalVotingPower != 0 {
  5664. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5665. i--
  5666. dAtA[i] = 0x28
  5667. }
  5668. n47, err47 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5669. if err47 != nil {
  5670. return 0, err47
  5671. }
  5672. i -= n47
  5673. i = encodeVarintTypes(dAtA, i, uint64(n47))
  5674. i--
  5675. dAtA[i] = 0x22
  5676. if m.Height != 0 {
  5677. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5678. i--
  5679. dAtA[i] = 0x18
  5680. }
  5681. {
  5682. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5683. if err != nil {
  5684. return 0, err
  5685. }
  5686. i -= size
  5687. i = encodeVarintTypes(dAtA, i, uint64(size))
  5688. }
  5689. i--
  5690. dAtA[i] = 0x12
  5691. if m.Type != 0 {
  5692. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5693. i--
  5694. dAtA[i] = 0x8
  5695. }
  5696. return len(dAtA) - i, nil
  5697. }
  5698. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5699. size := m.Size()
  5700. dAtA = make([]byte, size)
  5701. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5702. if err != nil {
  5703. return nil, err
  5704. }
  5705. return dAtA[:n], nil
  5706. }
  5707. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5708. size := m.Size()
  5709. return m.MarshalToSizedBuffer(dAtA[:size])
  5710. }
  5711. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5712. i := len(dAtA)
  5713. _ = i
  5714. var l int
  5715. _ = l
  5716. if len(m.Metadata) > 0 {
  5717. i -= len(m.Metadata)
  5718. copy(dAtA[i:], m.Metadata)
  5719. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5720. i--
  5721. dAtA[i] = 0x2a
  5722. }
  5723. if len(m.Hash) > 0 {
  5724. i -= len(m.Hash)
  5725. copy(dAtA[i:], m.Hash)
  5726. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5727. i--
  5728. dAtA[i] = 0x22
  5729. }
  5730. if m.Chunks != 0 {
  5731. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5732. i--
  5733. dAtA[i] = 0x18
  5734. }
  5735. if m.Format != 0 {
  5736. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5737. i--
  5738. dAtA[i] = 0x10
  5739. }
  5740. if m.Height != 0 {
  5741. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5742. i--
  5743. dAtA[i] = 0x8
  5744. }
  5745. return len(dAtA) - i, nil
  5746. }
  5747. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5748. offset -= sovTypes(v)
  5749. base := offset
  5750. for v >= 1<<7 {
  5751. dAtA[offset] = uint8(v&0x7f | 0x80)
  5752. v >>= 7
  5753. offset++
  5754. }
  5755. dAtA[offset] = uint8(v)
  5756. return base
  5757. }
  5758. func (m *Request) Size() (n int) {
  5759. if m == nil {
  5760. return 0
  5761. }
  5762. var l int
  5763. _ = l
  5764. if m.Value != nil {
  5765. n += m.Value.Size()
  5766. }
  5767. return n
  5768. }
  5769. func (m *Request_Echo) Size() (n int) {
  5770. if m == nil {
  5771. return 0
  5772. }
  5773. var l int
  5774. _ = l
  5775. if m.Echo != nil {
  5776. l = m.Echo.Size()
  5777. n += 1 + l + sovTypes(uint64(l))
  5778. }
  5779. return n
  5780. }
  5781. func (m *Request_Flush) Size() (n int) {
  5782. if m == nil {
  5783. return 0
  5784. }
  5785. var l int
  5786. _ = l
  5787. if m.Flush != nil {
  5788. l = m.Flush.Size()
  5789. n += 1 + l + sovTypes(uint64(l))
  5790. }
  5791. return n
  5792. }
  5793. func (m *Request_Info) Size() (n int) {
  5794. if m == nil {
  5795. return 0
  5796. }
  5797. var l int
  5798. _ = l
  5799. if m.Info != nil {
  5800. l = m.Info.Size()
  5801. n += 1 + l + sovTypes(uint64(l))
  5802. }
  5803. return n
  5804. }
  5805. func (m *Request_InitChain) Size() (n int) {
  5806. if m == nil {
  5807. return 0
  5808. }
  5809. var l int
  5810. _ = l
  5811. if m.InitChain != nil {
  5812. l = m.InitChain.Size()
  5813. n += 1 + l + sovTypes(uint64(l))
  5814. }
  5815. return n
  5816. }
  5817. func (m *Request_Query) Size() (n int) {
  5818. if m == nil {
  5819. return 0
  5820. }
  5821. var l int
  5822. _ = l
  5823. if m.Query != nil {
  5824. l = m.Query.Size()
  5825. n += 1 + l + sovTypes(uint64(l))
  5826. }
  5827. return n
  5828. }
  5829. func (m *Request_BeginBlock) Size() (n int) {
  5830. if m == nil {
  5831. return 0
  5832. }
  5833. var l int
  5834. _ = l
  5835. if m.BeginBlock != nil {
  5836. l = m.BeginBlock.Size()
  5837. n += 1 + l + sovTypes(uint64(l))
  5838. }
  5839. return n
  5840. }
  5841. func (m *Request_CheckTx) Size() (n int) {
  5842. if m == nil {
  5843. return 0
  5844. }
  5845. var l int
  5846. _ = l
  5847. if m.CheckTx != nil {
  5848. l = m.CheckTx.Size()
  5849. n += 1 + l + sovTypes(uint64(l))
  5850. }
  5851. return n
  5852. }
  5853. func (m *Request_DeliverTx) Size() (n int) {
  5854. if m == nil {
  5855. return 0
  5856. }
  5857. var l int
  5858. _ = l
  5859. if m.DeliverTx != nil {
  5860. l = m.DeliverTx.Size()
  5861. n += 1 + l + sovTypes(uint64(l))
  5862. }
  5863. return n
  5864. }
  5865. func (m *Request_EndBlock) Size() (n int) {
  5866. if m == nil {
  5867. return 0
  5868. }
  5869. var l int
  5870. _ = l
  5871. if m.EndBlock != nil {
  5872. l = m.EndBlock.Size()
  5873. n += 1 + l + sovTypes(uint64(l))
  5874. }
  5875. return n
  5876. }
  5877. func (m *Request_Commit) Size() (n int) {
  5878. if m == nil {
  5879. return 0
  5880. }
  5881. var l int
  5882. _ = l
  5883. if m.Commit != nil {
  5884. l = m.Commit.Size()
  5885. n += 1 + l + sovTypes(uint64(l))
  5886. }
  5887. return n
  5888. }
  5889. func (m *Request_ListSnapshots) Size() (n int) {
  5890. if m == nil {
  5891. return 0
  5892. }
  5893. var l int
  5894. _ = l
  5895. if m.ListSnapshots != nil {
  5896. l = m.ListSnapshots.Size()
  5897. n += 1 + l + sovTypes(uint64(l))
  5898. }
  5899. return n
  5900. }
  5901. func (m *Request_OfferSnapshot) Size() (n int) {
  5902. if m == nil {
  5903. return 0
  5904. }
  5905. var l int
  5906. _ = l
  5907. if m.OfferSnapshot != nil {
  5908. l = m.OfferSnapshot.Size()
  5909. n += 1 + l + sovTypes(uint64(l))
  5910. }
  5911. return n
  5912. }
  5913. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5914. if m == nil {
  5915. return 0
  5916. }
  5917. var l int
  5918. _ = l
  5919. if m.LoadSnapshotChunk != nil {
  5920. l = m.LoadSnapshotChunk.Size()
  5921. n += 1 + l + sovTypes(uint64(l))
  5922. }
  5923. return n
  5924. }
  5925. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5926. if m == nil {
  5927. return 0
  5928. }
  5929. var l int
  5930. _ = l
  5931. if m.ApplySnapshotChunk != nil {
  5932. l = m.ApplySnapshotChunk.Size()
  5933. n += 1 + l + sovTypes(uint64(l))
  5934. }
  5935. return n
  5936. }
  5937. func (m *RequestEcho) Size() (n int) {
  5938. if m == nil {
  5939. return 0
  5940. }
  5941. var l int
  5942. _ = l
  5943. l = len(m.Message)
  5944. if l > 0 {
  5945. n += 1 + l + sovTypes(uint64(l))
  5946. }
  5947. return n
  5948. }
  5949. func (m *RequestFlush) Size() (n int) {
  5950. if m == nil {
  5951. return 0
  5952. }
  5953. var l int
  5954. _ = l
  5955. return n
  5956. }
  5957. func (m *RequestInfo) Size() (n int) {
  5958. if m == nil {
  5959. return 0
  5960. }
  5961. var l int
  5962. _ = l
  5963. l = len(m.Version)
  5964. if l > 0 {
  5965. n += 1 + l + sovTypes(uint64(l))
  5966. }
  5967. if m.BlockVersion != 0 {
  5968. n += 1 + sovTypes(uint64(m.BlockVersion))
  5969. }
  5970. if m.P2PVersion != 0 {
  5971. n += 1 + sovTypes(uint64(m.P2PVersion))
  5972. }
  5973. l = len(m.AbciVersion)
  5974. if l > 0 {
  5975. n += 1 + l + sovTypes(uint64(l))
  5976. }
  5977. return n
  5978. }
  5979. func (m *RequestInitChain) Size() (n int) {
  5980. if m == nil {
  5981. return 0
  5982. }
  5983. var l int
  5984. _ = l
  5985. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5986. n += 1 + l + sovTypes(uint64(l))
  5987. l = len(m.ChainId)
  5988. if l > 0 {
  5989. n += 1 + l + sovTypes(uint64(l))
  5990. }
  5991. if m.ConsensusParams != nil {
  5992. l = m.ConsensusParams.Size()
  5993. n += 1 + l + sovTypes(uint64(l))
  5994. }
  5995. if len(m.Validators) > 0 {
  5996. for _, e := range m.Validators {
  5997. l = e.Size()
  5998. n += 1 + l + sovTypes(uint64(l))
  5999. }
  6000. }
  6001. l = len(m.AppStateBytes)
  6002. if l > 0 {
  6003. n += 1 + l + sovTypes(uint64(l))
  6004. }
  6005. if m.InitialHeight != 0 {
  6006. n += 1 + sovTypes(uint64(m.InitialHeight))
  6007. }
  6008. return n
  6009. }
  6010. func (m *RequestQuery) Size() (n int) {
  6011. if m == nil {
  6012. return 0
  6013. }
  6014. var l int
  6015. _ = l
  6016. l = len(m.Data)
  6017. if l > 0 {
  6018. n += 1 + l + sovTypes(uint64(l))
  6019. }
  6020. l = len(m.Path)
  6021. if l > 0 {
  6022. n += 1 + l + sovTypes(uint64(l))
  6023. }
  6024. if m.Height != 0 {
  6025. n += 1 + sovTypes(uint64(m.Height))
  6026. }
  6027. if m.Prove {
  6028. n += 2
  6029. }
  6030. return n
  6031. }
  6032. func (m *RequestBeginBlock) Size() (n int) {
  6033. if m == nil {
  6034. return 0
  6035. }
  6036. var l int
  6037. _ = l
  6038. l = len(m.Hash)
  6039. if l > 0 {
  6040. n += 1 + l + sovTypes(uint64(l))
  6041. }
  6042. l = m.Header.Size()
  6043. n += 1 + l + sovTypes(uint64(l))
  6044. l = m.LastCommitInfo.Size()
  6045. n += 1 + l + sovTypes(uint64(l))
  6046. if len(m.ByzantineValidators) > 0 {
  6047. for _, e := range m.ByzantineValidators {
  6048. l = e.Size()
  6049. n += 1 + l + sovTypes(uint64(l))
  6050. }
  6051. }
  6052. return n
  6053. }
  6054. func (m *RequestCheckTx) Size() (n int) {
  6055. if m == nil {
  6056. return 0
  6057. }
  6058. var l int
  6059. _ = l
  6060. l = len(m.Tx)
  6061. if l > 0 {
  6062. n += 1 + l + sovTypes(uint64(l))
  6063. }
  6064. if m.Type != 0 {
  6065. n += 1 + sovTypes(uint64(m.Type))
  6066. }
  6067. return n
  6068. }
  6069. func (m *RequestDeliverTx) Size() (n int) {
  6070. if m == nil {
  6071. return 0
  6072. }
  6073. var l int
  6074. _ = l
  6075. l = len(m.Tx)
  6076. if l > 0 {
  6077. n += 1 + l + sovTypes(uint64(l))
  6078. }
  6079. return n
  6080. }
  6081. func (m *RequestEndBlock) Size() (n int) {
  6082. if m == nil {
  6083. return 0
  6084. }
  6085. var l int
  6086. _ = l
  6087. if m.Height != 0 {
  6088. n += 1 + sovTypes(uint64(m.Height))
  6089. }
  6090. return n
  6091. }
  6092. func (m *RequestCommit) Size() (n int) {
  6093. if m == nil {
  6094. return 0
  6095. }
  6096. var l int
  6097. _ = l
  6098. return n
  6099. }
  6100. func (m *RequestListSnapshots) Size() (n int) {
  6101. if m == nil {
  6102. return 0
  6103. }
  6104. var l int
  6105. _ = l
  6106. return n
  6107. }
  6108. func (m *RequestOfferSnapshot) Size() (n int) {
  6109. if m == nil {
  6110. return 0
  6111. }
  6112. var l int
  6113. _ = l
  6114. if m.Snapshot != nil {
  6115. l = m.Snapshot.Size()
  6116. n += 1 + l + sovTypes(uint64(l))
  6117. }
  6118. l = len(m.AppHash)
  6119. if l > 0 {
  6120. n += 1 + l + sovTypes(uint64(l))
  6121. }
  6122. return n
  6123. }
  6124. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  6125. if m == nil {
  6126. return 0
  6127. }
  6128. var l int
  6129. _ = l
  6130. if m.Height != 0 {
  6131. n += 1 + sovTypes(uint64(m.Height))
  6132. }
  6133. if m.Format != 0 {
  6134. n += 1 + sovTypes(uint64(m.Format))
  6135. }
  6136. if m.Chunk != 0 {
  6137. n += 1 + sovTypes(uint64(m.Chunk))
  6138. }
  6139. return n
  6140. }
  6141. func (m *RequestApplySnapshotChunk) Size() (n int) {
  6142. if m == nil {
  6143. return 0
  6144. }
  6145. var l int
  6146. _ = l
  6147. if m.Index != 0 {
  6148. n += 1 + sovTypes(uint64(m.Index))
  6149. }
  6150. l = len(m.Chunk)
  6151. if l > 0 {
  6152. n += 1 + l + sovTypes(uint64(l))
  6153. }
  6154. l = len(m.Sender)
  6155. if l > 0 {
  6156. n += 1 + l + sovTypes(uint64(l))
  6157. }
  6158. return n
  6159. }
  6160. func (m *Response) Size() (n int) {
  6161. if m == nil {
  6162. return 0
  6163. }
  6164. var l int
  6165. _ = l
  6166. if m.Value != nil {
  6167. n += m.Value.Size()
  6168. }
  6169. return n
  6170. }
  6171. func (m *Response_Exception) Size() (n int) {
  6172. if m == nil {
  6173. return 0
  6174. }
  6175. var l int
  6176. _ = l
  6177. if m.Exception != nil {
  6178. l = m.Exception.Size()
  6179. n += 1 + l + sovTypes(uint64(l))
  6180. }
  6181. return n
  6182. }
  6183. func (m *Response_Echo) Size() (n int) {
  6184. if m == nil {
  6185. return 0
  6186. }
  6187. var l int
  6188. _ = l
  6189. if m.Echo != nil {
  6190. l = m.Echo.Size()
  6191. n += 1 + l + sovTypes(uint64(l))
  6192. }
  6193. return n
  6194. }
  6195. func (m *Response_Flush) Size() (n int) {
  6196. if m == nil {
  6197. return 0
  6198. }
  6199. var l int
  6200. _ = l
  6201. if m.Flush != nil {
  6202. l = m.Flush.Size()
  6203. n += 1 + l + sovTypes(uint64(l))
  6204. }
  6205. return n
  6206. }
  6207. func (m *Response_Info) Size() (n int) {
  6208. if m == nil {
  6209. return 0
  6210. }
  6211. var l int
  6212. _ = l
  6213. if m.Info != nil {
  6214. l = m.Info.Size()
  6215. n += 1 + l + sovTypes(uint64(l))
  6216. }
  6217. return n
  6218. }
  6219. func (m *Response_InitChain) Size() (n int) {
  6220. if m == nil {
  6221. return 0
  6222. }
  6223. var l int
  6224. _ = l
  6225. if m.InitChain != nil {
  6226. l = m.InitChain.Size()
  6227. n += 1 + l + sovTypes(uint64(l))
  6228. }
  6229. return n
  6230. }
  6231. func (m *Response_Query) Size() (n int) {
  6232. if m == nil {
  6233. return 0
  6234. }
  6235. var l int
  6236. _ = l
  6237. if m.Query != nil {
  6238. l = m.Query.Size()
  6239. n += 1 + l + sovTypes(uint64(l))
  6240. }
  6241. return n
  6242. }
  6243. func (m *Response_BeginBlock) Size() (n int) {
  6244. if m == nil {
  6245. return 0
  6246. }
  6247. var l int
  6248. _ = l
  6249. if m.BeginBlock != nil {
  6250. l = m.BeginBlock.Size()
  6251. n += 1 + l + sovTypes(uint64(l))
  6252. }
  6253. return n
  6254. }
  6255. func (m *Response_CheckTx) Size() (n int) {
  6256. if m == nil {
  6257. return 0
  6258. }
  6259. var l int
  6260. _ = l
  6261. if m.CheckTx != nil {
  6262. l = m.CheckTx.Size()
  6263. n += 1 + l + sovTypes(uint64(l))
  6264. }
  6265. return n
  6266. }
  6267. func (m *Response_DeliverTx) Size() (n int) {
  6268. if m == nil {
  6269. return 0
  6270. }
  6271. var l int
  6272. _ = l
  6273. if m.DeliverTx != nil {
  6274. l = m.DeliverTx.Size()
  6275. n += 1 + l + sovTypes(uint64(l))
  6276. }
  6277. return n
  6278. }
  6279. func (m *Response_EndBlock) Size() (n int) {
  6280. if m == nil {
  6281. return 0
  6282. }
  6283. var l int
  6284. _ = l
  6285. if m.EndBlock != nil {
  6286. l = m.EndBlock.Size()
  6287. n += 1 + l + sovTypes(uint64(l))
  6288. }
  6289. return n
  6290. }
  6291. func (m *Response_Commit) Size() (n int) {
  6292. if m == nil {
  6293. return 0
  6294. }
  6295. var l int
  6296. _ = l
  6297. if m.Commit != nil {
  6298. l = m.Commit.Size()
  6299. n += 1 + l + sovTypes(uint64(l))
  6300. }
  6301. return n
  6302. }
  6303. func (m *Response_ListSnapshots) Size() (n int) {
  6304. if m == nil {
  6305. return 0
  6306. }
  6307. var l int
  6308. _ = l
  6309. if m.ListSnapshots != nil {
  6310. l = m.ListSnapshots.Size()
  6311. n += 1 + l + sovTypes(uint64(l))
  6312. }
  6313. return n
  6314. }
  6315. func (m *Response_OfferSnapshot) Size() (n int) {
  6316. if m == nil {
  6317. return 0
  6318. }
  6319. var l int
  6320. _ = l
  6321. if m.OfferSnapshot != nil {
  6322. l = m.OfferSnapshot.Size()
  6323. n += 1 + l + sovTypes(uint64(l))
  6324. }
  6325. return n
  6326. }
  6327. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6328. if m == nil {
  6329. return 0
  6330. }
  6331. var l int
  6332. _ = l
  6333. if m.LoadSnapshotChunk != nil {
  6334. l = m.LoadSnapshotChunk.Size()
  6335. n += 1 + l + sovTypes(uint64(l))
  6336. }
  6337. return n
  6338. }
  6339. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6340. if m == nil {
  6341. return 0
  6342. }
  6343. var l int
  6344. _ = l
  6345. if m.ApplySnapshotChunk != nil {
  6346. l = m.ApplySnapshotChunk.Size()
  6347. n += 1 + l + sovTypes(uint64(l))
  6348. }
  6349. return n
  6350. }
  6351. func (m *ResponseException) Size() (n int) {
  6352. if m == nil {
  6353. return 0
  6354. }
  6355. var l int
  6356. _ = l
  6357. l = len(m.Error)
  6358. if l > 0 {
  6359. n += 1 + l + sovTypes(uint64(l))
  6360. }
  6361. return n
  6362. }
  6363. func (m *ResponseEcho) Size() (n int) {
  6364. if m == nil {
  6365. return 0
  6366. }
  6367. var l int
  6368. _ = l
  6369. l = len(m.Message)
  6370. if l > 0 {
  6371. n += 1 + l + sovTypes(uint64(l))
  6372. }
  6373. return n
  6374. }
  6375. func (m *ResponseFlush) Size() (n int) {
  6376. if m == nil {
  6377. return 0
  6378. }
  6379. var l int
  6380. _ = l
  6381. return n
  6382. }
  6383. func (m *ResponseInfo) Size() (n int) {
  6384. if m == nil {
  6385. return 0
  6386. }
  6387. var l int
  6388. _ = l
  6389. l = len(m.Data)
  6390. if l > 0 {
  6391. n += 1 + l + sovTypes(uint64(l))
  6392. }
  6393. l = len(m.Version)
  6394. if l > 0 {
  6395. n += 1 + l + sovTypes(uint64(l))
  6396. }
  6397. if m.AppVersion != 0 {
  6398. n += 1 + sovTypes(uint64(m.AppVersion))
  6399. }
  6400. if m.LastBlockHeight != 0 {
  6401. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6402. }
  6403. l = len(m.LastBlockAppHash)
  6404. if l > 0 {
  6405. n += 1 + l + sovTypes(uint64(l))
  6406. }
  6407. return n
  6408. }
  6409. func (m *ResponseInitChain) Size() (n int) {
  6410. if m == nil {
  6411. return 0
  6412. }
  6413. var l int
  6414. _ = l
  6415. if m.ConsensusParams != nil {
  6416. l = m.ConsensusParams.Size()
  6417. n += 1 + l + sovTypes(uint64(l))
  6418. }
  6419. if len(m.Validators) > 0 {
  6420. for _, e := range m.Validators {
  6421. l = e.Size()
  6422. n += 1 + l + sovTypes(uint64(l))
  6423. }
  6424. }
  6425. l = len(m.AppHash)
  6426. if l > 0 {
  6427. n += 1 + l + sovTypes(uint64(l))
  6428. }
  6429. return n
  6430. }
  6431. func (m *ResponseQuery) Size() (n int) {
  6432. if m == nil {
  6433. return 0
  6434. }
  6435. var l int
  6436. _ = l
  6437. if m.Code != 0 {
  6438. n += 1 + sovTypes(uint64(m.Code))
  6439. }
  6440. l = len(m.Log)
  6441. if l > 0 {
  6442. n += 1 + l + sovTypes(uint64(l))
  6443. }
  6444. l = len(m.Info)
  6445. if l > 0 {
  6446. n += 1 + l + sovTypes(uint64(l))
  6447. }
  6448. if m.Index != 0 {
  6449. n += 1 + sovTypes(uint64(m.Index))
  6450. }
  6451. l = len(m.Key)
  6452. if l > 0 {
  6453. n += 1 + l + sovTypes(uint64(l))
  6454. }
  6455. l = len(m.Value)
  6456. if l > 0 {
  6457. n += 1 + l + sovTypes(uint64(l))
  6458. }
  6459. if m.ProofOps != nil {
  6460. l = m.ProofOps.Size()
  6461. n += 1 + l + sovTypes(uint64(l))
  6462. }
  6463. if m.Height != 0 {
  6464. n += 1 + sovTypes(uint64(m.Height))
  6465. }
  6466. l = len(m.Codespace)
  6467. if l > 0 {
  6468. n += 1 + l + sovTypes(uint64(l))
  6469. }
  6470. return n
  6471. }
  6472. func (m *ResponseBeginBlock) Size() (n int) {
  6473. if m == nil {
  6474. return 0
  6475. }
  6476. var l int
  6477. _ = l
  6478. if len(m.Events) > 0 {
  6479. for _, e := range m.Events {
  6480. l = e.Size()
  6481. n += 1 + l + sovTypes(uint64(l))
  6482. }
  6483. }
  6484. return n
  6485. }
  6486. func (m *ResponseCheckTx) Size() (n int) {
  6487. if m == nil {
  6488. return 0
  6489. }
  6490. var l int
  6491. _ = l
  6492. if m.Code != 0 {
  6493. n += 1 + sovTypes(uint64(m.Code))
  6494. }
  6495. l = len(m.Data)
  6496. if l > 0 {
  6497. n += 1 + l + sovTypes(uint64(l))
  6498. }
  6499. l = len(m.Log)
  6500. if l > 0 {
  6501. n += 1 + l + sovTypes(uint64(l))
  6502. }
  6503. l = len(m.Info)
  6504. if l > 0 {
  6505. n += 1 + l + sovTypes(uint64(l))
  6506. }
  6507. if m.GasWanted != 0 {
  6508. n += 1 + sovTypes(uint64(m.GasWanted))
  6509. }
  6510. if m.GasUsed != 0 {
  6511. n += 1 + sovTypes(uint64(m.GasUsed))
  6512. }
  6513. if len(m.Events) > 0 {
  6514. for _, e := range m.Events {
  6515. l = e.Size()
  6516. n += 1 + l + sovTypes(uint64(l))
  6517. }
  6518. }
  6519. l = len(m.Codespace)
  6520. if l > 0 {
  6521. n += 1 + l + sovTypes(uint64(l))
  6522. }
  6523. return n
  6524. }
  6525. func (m *ResponseDeliverTx) Size() (n int) {
  6526. if m == nil {
  6527. return 0
  6528. }
  6529. var l int
  6530. _ = l
  6531. if m.Code != 0 {
  6532. n += 1 + sovTypes(uint64(m.Code))
  6533. }
  6534. l = len(m.Data)
  6535. if l > 0 {
  6536. n += 1 + l + sovTypes(uint64(l))
  6537. }
  6538. l = len(m.Log)
  6539. if l > 0 {
  6540. n += 1 + l + sovTypes(uint64(l))
  6541. }
  6542. l = len(m.Info)
  6543. if l > 0 {
  6544. n += 1 + l + sovTypes(uint64(l))
  6545. }
  6546. if m.GasWanted != 0 {
  6547. n += 1 + sovTypes(uint64(m.GasWanted))
  6548. }
  6549. if m.GasUsed != 0 {
  6550. n += 1 + sovTypes(uint64(m.GasUsed))
  6551. }
  6552. if len(m.Events) > 0 {
  6553. for _, e := range m.Events {
  6554. l = e.Size()
  6555. n += 1 + l + sovTypes(uint64(l))
  6556. }
  6557. }
  6558. l = len(m.Codespace)
  6559. if l > 0 {
  6560. n += 1 + l + sovTypes(uint64(l))
  6561. }
  6562. return n
  6563. }
  6564. func (m *ResponseEndBlock) Size() (n int) {
  6565. if m == nil {
  6566. return 0
  6567. }
  6568. var l int
  6569. _ = l
  6570. if len(m.ValidatorUpdates) > 0 {
  6571. for _, e := range m.ValidatorUpdates {
  6572. l = e.Size()
  6573. n += 1 + l + sovTypes(uint64(l))
  6574. }
  6575. }
  6576. if m.ConsensusParamUpdates != nil {
  6577. l = m.ConsensusParamUpdates.Size()
  6578. n += 1 + l + sovTypes(uint64(l))
  6579. }
  6580. if len(m.Events) > 0 {
  6581. for _, e := range m.Events {
  6582. l = e.Size()
  6583. n += 1 + l + sovTypes(uint64(l))
  6584. }
  6585. }
  6586. return n
  6587. }
  6588. func (m *ResponseCommit) Size() (n int) {
  6589. if m == nil {
  6590. return 0
  6591. }
  6592. var l int
  6593. _ = l
  6594. l = len(m.Data)
  6595. if l > 0 {
  6596. n += 1 + l + sovTypes(uint64(l))
  6597. }
  6598. if m.RetainHeight != 0 {
  6599. n += 1 + sovTypes(uint64(m.RetainHeight))
  6600. }
  6601. return n
  6602. }
  6603. func (m *ResponseListSnapshots) Size() (n int) {
  6604. if m == nil {
  6605. return 0
  6606. }
  6607. var l int
  6608. _ = l
  6609. if len(m.Snapshots) > 0 {
  6610. for _, e := range m.Snapshots {
  6611. l = e.Size()
  6612. n += 1 + l + sovTypes(uint64(l))
  6613. }
  6614. }
  6615. return n
  6616. }
  6617. func (m *ResponseOfferSnapshot) Size() (n int) {
  6618. if m == nil {
  6619. return 0
  6620. }
  6621. var l int
  6622. _ = l
  6623. if m.Result != 0 {
  6624. n += 1 + sovTypes(uint64(m.Result))
  6625. }
  6626. return n
  6627. }
  6628. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6629. if m == nil {
  6630. return 0
  6631. }
  6632. var l int
  6633. _ = l
  6634. l = len(m.Chunk)
  6635. if l > 0 {
  6636. n += 1 + l + sovTypes(uint64(l))
  6637. }
  6638. return n
  6639. }
  6640. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6641. if m == nil {
  6642. return 0
  6643. }
  6644. var l int
  6645. _ = l
  6646. if m.Result != 0 {
  6647. n += 1 + sovTypes(uint64(m.Result))
  6648. }
  6649. if len(m.RefetchChunks) > 0 {
  6650. l = 0
  6651. for _, e := range m.RefetchChunks {
  6652. l += sovTypes(uint64(e))
  6653. }
  6654. n += 1 + sovTypes(uint64(l)) + l
  6655. }
  6656. if len(m.RejectSenders) > 0 {
  6657. for _, s := range m.RejectSenders {
  6658. l = len(s)
  6659. n += 1 + l + sovTypes(uint64(l))
  6660. }
  6661. }
  6662. return n
  6663. }
  6664. func (m *ConsensusParams) Size() (n int) {
  6665. if m == nil {
  6666. return 0
  6667. }
  6668. var l int
  6669. _ = l
  6670. if m.Block != nil {
  6671. l = m.Block.Size()
  6672. n += 1 + l + sovTypes(uint64(l))
  6673. }
  6674. if m.Evidence != nil {
  6675. l = m.Evidence.Size()
  6676. n += 1 + l + sovTypes(uint64(l))
  6677. }
  6678. if m.Validator != nil {
  6679. l = m.Validator.Size()
  6680. n += 1 + l + sovTypes(uint64(l))
  6681. }
  6682. if m.Version != nil {
  6683. l = m.Version.Size()
  6684. n += 1 + l + sovTypes(uint64(l))
  6685. }
  6686. return n
  6687. }
  6688. func (m *BlockParams) Size() (n int) {
  6689. if m == nil {
  6690. return 0
  6691. }
  6692. var l int
  6693. _ = l
  6694. if m.MaxBytes != 0 {
  6695. n += 1 + sovTypes(uint64(m.MaxBytes))
  6696. }
  6697. if m.MaxGas != 0 {
  6698. n += 1 + sovTypes(uint64(m.MaxGas))
  6699. }
  6700. return n
  6701. }
  6702. func (m *LastCommitInfo) Size() (n int) {
  6703. if m == nil {
  6704. return 0
  6705. }
  6706. var l int
  6707. _ = l
  6708. if m.Round != 0 {
  6709. n += 1 + sovTypes(uint64(m.Round))
  6710. }
  6711. if len(m.Votes) > 0 {
  6712. for _, e := range m.Votes {
  6713. l = e.Size()
  6714. n += 1 + l + sovTypes(uint64(l))
  6715. }
  6716. }
  6717. return n
  6718. }
  6719. func (m *Event) Size() (n int) {
  6720. if m == nil {
  6721. return 0
  6722. }
  6723. var l int
  6724. _ = l
  6725. l = len(m.Type)
  6726. if l > 0 {
  6727. n += 1 + l + sovTypes(uint64(l))
  6728. }
  6729. if len(m.Attributes) > 0 {
  6730. for _, e := range m.Attributes {
  6731. l = e.Size()
  6732. n += 1 + l + sovTypes(uint64(l))
  6733. }
  6734. }
  6735. return n
  6736. }
  6737. func (m *EventAttribute) Size() (n int) {
  6738. if m == nil {
  6739. return 0
  6740. }
  6741. var l int
  6742. _ = l
  6743. l = len(m.Key)
  6744. if l > 0 {
  6745. n += 1 + l + sovTypes(uint64(l))
  6746. }
  6747. l = len(m.Value)
  6748. if l > 0 {
  6749. n += 1 + l + sovTypes(uint64(l))
  6750. }
  6751. if m.Index {
  6752. n += 2
  6753. }
  6754. return n
  6755. }
  6756. func (m *TxResult) Size() (n int) {
  6757. if m == nil {
  6758. return 0
  6759. }
  6760. var l int
  6761. _ = l
  6762. if m.Height != 0 {
  6763. n += 1 + sovTypes(uint64(m.Height))
  6764. }
  6765. if m.Index != 0 {
  6766. n += 1 + sovTypes(uint64(m.Index))
  6767. }
  6768. l = len(m.Tx)
  6769. if l > 0 {
  6770. n += 1 + l + sovTypes(uint64(l))
  6771. }
  6772. l = m.Result.Size()
  6773. n += 1 + l + sovTypes(uint64(l))
  6774. return n
  6775. }
  6776. func (m *Validator) Size() (n int) {
  6777. if m == nil {
  6778. return 0
  6779. }
  6780. var l int
  6781. _ = l
  6782. l = len(m.Address)
  6783. if l > 0 {
  6784. n += 1 + l + sovTypes(uint64(l))
  6785. }
  6786. if m.Power != 0 {
  6787. n += 1 + sovTypes(uint64(m.Power))
  6788. }
  6789. return n
  6790. }
  6791. func (m *ValidatorUpdate) Size() (n int) {
  6792. if m == nil {
  6793. return 0
  6794. }
  6795. var l int
  6796. _ = l
  6797. l = m.PubKey.Size()
  6798. n += 1 + l + sovTypes(uint64(l))
  6799. if m.Power != 0 {
  6800. n += 1 + sovTypes(uint64(m.Power))
  6801. }
  6802. return n
  6803. }
  6804. func (m *VoteInfo) Size() (n int) {
  6805. if m == nil {
  6806. return 0
  6807. }
  6808. var l int
  6809. _ = l
  6810. l = m.Validator.Size()
  6811. n += 1 + l + sovTypes(uint64(l))
  6812. if m.SignedLastBlock {
  6813. n += 2
  6814. }
  6815. return n
  6816. }
  6817. func (m *Evidence) Size() (n int) {
  6818. if m == nil {
  6819. return 0
  6820. }
  6821. var l int
  6822. _ = l
  6823. if m.Type != 0 {
  6824. n += 1 + sovTypes(uint64(m.Type))
  6825. }
  6826. l = m.Validator.Size()
  6827. n += 1 + l + sovTypes(uint64(l))
  6828. if m.Height != 0 {
  6829. n += 1 + sovTypes(uint64(m.Height))
  6830. }
  6831. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6832. n += 1 + l + sovTypes(uint64(l))
  6833. if m.TotalVotingPower != 0 {
  6834. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6835. }
  6836. return n
  6837. }
  6838. func (m *Snapshot) Size() (n int) {
  6839. if m == nil {
  6840. return 0
  6841. }
  6842. var l int
  6843. _ = l
  6844. if m.Height != 0 {
  6845. n += 1 + sovTypes(uint64(m.Height))
  6846. }
  6847. if m.Format != 0 {
  6848. n += 1 + sovTypes(uint64(m.Format))
  6849. }
  6850. if m.Chunks != 0 {
  6851. n += 1 + sovTypes(uint64(m.Chunks))
  6852. }
  6853. l = len(m.Hash)
  6854. if l > 0 {
  6855. n += 1 + l + sovTypes(uint64(l))
  6856. }
  6857. l = len(m.Metadata)
  6858. if l > 0 {
  6859. n += 1 + l + sovTypes(uint64(l))
  6860. }
  6861. return n
  6862. }
  6863. func sovTypes(x uint64) (n int) {
  6864. return (math_bits.Len64(x|1) + 6) / 7
  6865. }
  6866. func sozTypes(x uint64) (n int) {
  6867. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6868. }
  6869. func (m *Request) Unmarshal(dAtA []byte) error {
  6870. l := len(dAtA)
  6871. iNdEx := 0
  6872. for iNdEx < l {
  6873. preIndex := iNdEx
  6874. var wire uint64
  6875. for shift := uint(0); ; shift += 7 {
  6876. if shift >= 64 {
  6877. return ErrIntOverflowTypes
  6878. }
  6879. if iNdEx >= l {
  6880. return io.ErrUnexpectedEOF
  6881. }
  6882. b := dAtA[iNdEx]
  6883. iNdEx++
  6884. wire |= uint64(b&0x7F) << shift
  6885. if b < 0x80 {
  6886. break
  6887. }
  6888. }
  6889. fieldNum := int32(wire >> 3)
  6890. wireType := int(wire & 0x7)
  6891. if wireType == 4 {
  6892. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6893. }
  6894. if fieldNum <= 0 {
  6895. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6896. }
  6897. switch fieldNum {
  6898. case 1:
  6899. if wireType != 2 {
  6900. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6901. }
  6902. var msglen int
  6903. for shift := uint(0); ; shift += 7 {
  6904. if shift >= 64 {
  6905. return ErrIntOverflowTypes
  6906. }
  6907. if iNdEx >= l {
  6908. return io.ErrUnexpectedEOF
  6909. }
  6910. b := dAtA[iNdEx]
  6911. iNdEx++
  6912. msglen |= int(b&0x7F) << shift
  6913. if b < 0x80 {
  6914. break
  6915. }
  6916. }
  6917. if msglen < 0 {
  6918. return ErrInvalidLengthTypes
  6919. }
  6920. postIndex := iNdEx + msglen
  6921. if postIndex < 0 {
  6922. return ErrInvalidLengthTypes
  6923. }
  6924. if postIndex > l {
  6925. return io.ErrUnexpectedEOF
  6926. }
  6927. v := &RequestEcho{}
  6928. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6929. return err
  6930. }
  6931. m.Value = &Request_Echo{v}
  6932. iNdEx = postIndex
  6933. case 2:
  6934. if wireType != 2 {
  6935. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6936. }
  6937. var msglen int
  6938. for shift := uint(0); ; shift += 7 {
  6939. if shift >= 64 {
  6940. return ErrIntOverflowTypes
  6941. }
  6942. if iNdEx >= l {
  6943. return io.ErrUnexpectedEOF
  6944. }
  6945. b := dAtA[iNdEx]
  6946. iNdEx++
  6947. msglen |= int(b&0x7F) << shift
  6948. if b < 0x80 {
  6949. break
  6950. }
  6951. }
  6952. if msglen < 0 {
  6953. return ErrInvalidLengthTypes
  6954. }
  6955. postIndex := iNdEx + msglen
  6956. if postIndex < 0 {
  6957. return ErrInvalidLengthTypes
  6958. }
  6959. if postIndex > l {
  6960. return io.ErrUnexpectedEOF
  6961. }
  6962. v := &RequestFlush{}
  6963. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6964. return err
  6965. }
  6966. m.Value = &Request_Flush{v}
  6967. iNdEx = postIndex
  6968. case 3:
  6969. if wireType != 2 {
  6970. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6971. }
  6972. var msglen int
  6973. for shift := uint(0); ; shift += 7 {
  6974. if shift >= 64 {
  6975. return ErrIntOverflowTypes
  6976. }
  6977. if iNdEx >= l {
  6978. return io.ErrUnexpectedEOF
  6979. }
  6980. b := dAtA[iNdEx]
  6981. iNdEx++
  6982. msglen |= int(b&0x7F) << shift
  6983. if b < 0x80 {
  6984. break
  6985. }
  6986. }
  6987. if msglen < 0 {
  6988. return ErrInvalidLengthTypes
  6989. }
  6990. postIndex := iNdEx + msglen
  6991. if postIndex < 0 {
  6992. return ErrInvalidLengthTypes
  6993. }
  6994. if postIndex > l {
  6995. return io.ErrUnexpectedEOF
  6996. }
  6997. v := &RequestInfo{}
  6998. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6999. return err
  7000. }
  7001. m.Value = &Request_Info{v}
  7002. iNdEx = postIndex
  7003. case 4:
  7004. if wireType != 2 {
  7005. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  7006. }
  7007. var msglen int
  7008. for shift := uint(0); ; shift += 7 {
  7009. if shift >= 64 {
  7010. return ErrIntOverflowTypes
  7011. }
  7012. if iNdEx >= l {
  7013. return io.ErrUnexpectedEOF
  7014. }
  7015. b := dAtA[iNdEx]
  7016. iNdEx++
  7017. msglen |= int(b&0x7F) << shift
  7018. if b < 0x80 {
  7019. break
  7020. }
  7021. }
  7022. if msglen < 0 {
  7023. return ErrInvalidLengthTypes
  7024. }
  7025. postIndex := iNdEx + msglen
  7026. if postIndex < 0 {
  7027. return ErrInvalidLengthTypes
  7028. }
  7029. if postIndex > l {
  7030. return io.ErrUnexpectedEOF
  7031. }
  7032. v := &RequestInitChain{}
  7033. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7034. return err
  7035. }
  7036. m.Value = &Request_InitChain{v}
  7037. iNdEx = postIndex
  7038. case 5:
  7039. if wireType != 2 {
  7040. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  7041. }
  7042. var msglen int
  7043. for shift := uint(0); ; shift += 7 {
  7044. if shift >= 64 {
  7045. return ErrIntOverflowTypes
  7046. }
  7047. if iNdEx >= l {
  7048. return io.ErrUnexpectedEOF
  7049. }
  7050. b := dAtA[iNdEx]
  7051. iNdEx++
  7052. msglen |= int(b&0x7F) << shift
  7053. if b < 0x80 {
  7054. break
  7055. }
  7056. }
  7057. if msglen < 0 {
  7058. return ErrInvalidLengthTypes
  7059. }
  7060. postIndex := iNdEx + msglen
  7061. if postIndex < 0 {
  7062. return ErrInvalidLengthTypes
  7063. }
  7064. if postIndex > l {
  7065. return io.ErrUnexpectedEOF
  7066. }
  7067. v := &RequestQuery{}
  7068. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7069. return err
  7070. }
  7071. m.Value = &Request_Query{v}
  7072. iNdEx = postIndex
  7073. case 6:
  7074. if wireType != 2 {
  7075. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  7076. }
  7077. var msglen int
  7078. for shift := uint(0); ; shift += 7 {
  7079. if shift >= 64 {
  7080. return ErrIntOverflowTypes
  7081. }
  7082. if iNdEx >= l {
  7083. return io.ErrUnexpectedEOF
  7084. }
  7085. b := dAtA[iNdEx]
  7086. iNdEx++
  7087. msglen |= int(b&0x7F) << shift
  7088. if b < 0x80 {
  7089. break
  7090. }
  7091. }
  7092. if msglen < 0 {
  7093. return ErrInvalidLengthTypes
  7094. }
  7095. postIndex := iNdEx + msglen
  7096. if postIndex < 0 {
  7097. return ErrInvalidLengthTypes
  7098. }
  7099. if postIndex > l {
  7100. return io.ErrUnexpectedEOF
  7101. }
  7102. v := &RequestBeginBlock{}
  7103. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7104. return err
  7105. }
  7106. m.Value = &Request_BeginBlock{v}
  7107. iNdEx = postIndex
  7108. case 7:
  7109. if wireType != 2 {
  7110. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  7111. }
  7112. var msglen int
  7113. for shift := uint(0); ; shift += 7 {
  7114. if shift >= 64 {
  7115. return ErrIntOverflowTypes
  7116. }
  7117. if iNdEx >= l {
  7118. return io.ErrUnexpectedEOF
  7119. }
  7120. b := dAtA[iNdEx]
  7121. iNdEx++
  7122. msglen |= int(b&0x7F) << shift
  7123. if b < 0x80 {
  7124. break
  7125. }
  7126. }
  7127. if msglen < 0 {
  7128. return ErrInvalidLengthTypes
  7129. }
  7130. postIndex := iNdEx + msglen
  7131. if postIndex < 0 {
  7132. return ErrInvalidLengthTypes
  7133. }
  7134. if postIndex > l {
  7135. return io.ErrUnexpectedEOF
  7136. }
  7137. v := &RequestCheckTx{}
  7138. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7139. return err
  7140. }
  7141. m.Value = &Request_CheckTx{v}
  7142. iNdEx = postIndex
  7143. case 8:
  7144. if wireType != 2 {
  7145. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  7146. }
  7147. var msglen int
  7148. for shift := uint(0); ; shift += 7 {
  7149. if shift >= 64 {
  7150. return ErrIntOverflowTypes
  7151. }
  7152. if iNdEx >= l {
  7153. return io.ErrUnexpectedEOF
  7154. }
  7155. b := dAtA[iNdEx]
  7156. iNdEx++
  7157. msglen |= int(b&0x7F) << shift
  7158. if b < 0x80 {
  7159. break
  7160. }
  7161. }
  7162. if msglen < 0 {
  7163. return ErrInvalidLengthTypes
  7164. }
  7165. postIndex := iNdEx + msglen
  7166. if postIndex < 0 {
  7167. return ErrInvalidLengthTypes
  7168. }
  7169. if postIndex > l {
  7170. return io.ErrUnexpectedEOF
  7171. }
  7172. v := &RequestDeliverTx{}
  7173. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7174. return err
  7175. }
  7176. m.Value = &Request_DeliverTx{v}
  7177. iNdEx = postIndex
  7178. case 9:
  7179. if wireType != 2 {
  7180. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  7181. }
  7182. var msglen int
  7183. for shift := uint(0); ; shift += 7 {
  7184. if shift >= 64 {
  7185. return ErrIntOverflowTypes
  7186. }
  7187. if iNdEx >= l {
  7188. return io.ErrUnexpectedEOF
  7189. }
  7190. b := dAtA[iNdEx]
  7191. iNdEx++
  7192. msglen |= int(b&0x7F) << shift
  7193. if b < 0x80 {
  7194. break
  7195. }
  7196. }
  7197. if msglen < 0 {
  7198. return ErrInvalidLengthTypes
  7199. }
  7200. postIndex := iNdEx + msglen
  7201. if postIndex < 0 {
  7202. return ErrInvalidLengthTypes
  7203. }
  7204. if postIndex > l {
  7205. return io.ErrUnexpectedEOF
  7206. }
  7207. v := &RequestEndBlock{}
  7208. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7209. return err
  7210. }
  7211. m.Value = &Request_EndBlock{v}
  7212. iNdEx = postIndex
  7213. case 10:
  7214. if wireType != 2 {
  7215. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7216. }
  7217. var msglen int
  7218. for shift := uint(0); ; shift += 7 {
  7219. if shift >= 64 {
  7220. return ErrIntOverflowTypes
  7221. }
  7222. if iNdEx >= l {
  7223. return io.ErrUnexpectedEOF
  7224. }
  7225. b := dAtA[iNdEx]
  7226. iNdEx++
  7227. msglen |= int(b&0x7F) << shift
  7228. if b < 0x80 {
  7229. break
  7230. }
  7231. }
  7232. if msglen < 0 {
  7233. return ErrInvalidLengthTypes
  7234. }
  7235. postIndex := iNdEx + msglen
  7236. if postIndex < 0 {
  7237. return ErrInvalidLengthTypes
  7238. }
  7239. if postIndex > l {
  7240. return io.ErrUnexpectedEOF
  7241. }
  7242. v := &RequestCommit{}
  7243. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7244. return err
  7245. }
  7246. m.Value = &Request_Commit{v}
  7247. iNdEx = postIndex
  7248. case 11:
  7249. if wireType != 2 {
  7250. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7251. }
  7252. var msglen int
  7253. for shift := uint(0); ; shift += 7 {
  7254. if shift >= 64 {
  7255. return ErrIntOverflowTypes
  7256. }
  7257. if iNdEx >= l {
  7258. return io.ErrUnexpectedEOF
  7259. }
  7260. b := dAtA[iNdEx]
  7261. iNdEx++
  7262. msglen |= int(b&0x7F) << shift
  7263. if b < 0x80 {
  7264. break
  7265. }
  7266. }
  7267. if msglen < 0 {
  7268. return ErrInvalidLengthTypes
  7269. }
  7270. postIndex := iNdEx + msglen
  7271. if postIndex < 0 {
  7272. return ErrInvalidLengthTypes
  7273. }
  7274. if postIndex > l {
  7275. return io.ErrUnexpectedEOF
  7276. }
  7277. v := &RequestListSnapshots{}
  7278. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7279. return err
  7280. }
  7281. m.Value = &Request_ListSnapshots{v}
  7282. iNdEx = postIndex
  7283. case 12:
  7284. if wireType != 2 {
  7285. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7286. }
  7287. var msglen int
  7288. for shift := uint(0); ; shift += 7 {
  7289. if shift >= 64 {
  7290. return ErrIntOverflowTypes
  7291. }
  7292. if iNdEx >= l {
  7293. return io.ErrUnexpectedEOF
  7294. }
  7295. b := dAtA[iNdEx]
  7296. iNdEx++
  7297. msglen |= int(b&0x7F) << shift
  7298. if b < 0x80 {
  7299. break
  7300. }
  7301. }
  7302. if msglen < 0 {
  7303. return ErrInvalidLengthTypes
  7304. }
  7305. postIndex := iNdEx + msglen
  7306. if postIndex < 0 {
  7307. return ErrInvalidLengthTypes
  7308. }
  7309. if postIndex > l {
  7310. return io.ErrUnexpectedEOF
  7311. }
  7312. v := &RequestOfferSnapshot{}
  7313. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7314. return err
  7315. }
  7316. m.Value = &Request_OfferSnapshot{v}
  7317. iNdEx = postIndex
  7318. case 13:
  7319. if wireType != 2 {
  7320. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7321. }
  7322. var msglen int
  7323. for shift := uint(0); ; shift += 7 {
  7324. if shift >= 64 {
  7325. return ErrIntOverflowTypes
  7326. }
  7327. if iNdEx >= l {
  7328. return io.ErrUnexpectedEOF
  7329. }
  7330. b := dAtA[iNdEx]
  7331. iNdEx++
  7332. msglen |= int(b&0x7F) << shift
  7333. if b < 0x80 {
  7334. break
  7335. }
  7336. }
  7337. if msglen < 0 {
  7338. return ErrInvalidLengthTypes
  7339. }
  7340. postIndex := iNdEx + msglen
  7341. if postIndex < 0 {
  7342. return ErrInvalidLengthTypes
  7343. }
  7344. if postIndex > l {
  7345. return io.ErrUnexpectedEOF
  7346. }
  7347. v := &RequestLoadSnapshotChunk{}
  7348. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7349. return err
  7350. }
  7351. m.Value = &Request_LoadSnapshotChunk{v}
  7352. iNdEx = postIndex
  7353. case 14:
  7354. if wireType != 2 {
  7355. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7356. }
  7357. var msglen int
  7358. for shift := uint(0); ; shift += 7 {
  7359. if shift >= 64 {
  7360. return ErrIntOverflowTypes
  7361. }
  7362. if iNdEx >= l {
  7363. return io.ErrUnexpectedEOF
  7364. }
  7365. b := dAtA[iNdEx]
  7366. iNdEx++
  7367. msglen |= int(b&0x7F) << shift
  7368. if b < 0x80 {
  7369. break
  7370. }
  7371. }
  7372. if msglen < 0 {
  7373. return ErrInvalidLengthTypes
  7374. }
  7375. postIndex := iNdEx + msglen
  7376. if postIndex < 0 {
  7377. return ErrInvalidLengthTypes
  7378. }
  7379. if postIndex > l {
  7380. return io.ErrUnexpectedEOF
  7381. }
  7382. v := &RequestApplySnapshotChunk{}
  7383. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7384. return err
  7385. }
  7386. m.Value = &Request_ApplySnapshotChunk{v}
  7387. iNdEx = postIndex
  7388. default:
  7389. iNdEx = preIndex
  7390. skippy, err := skipTypes(dAtA[iNdEx:])
  7391. if err != nil {
  7392. return err
  7393. }
  7394. if skippy < 0 {
  7395. return ErrInvalidLengthTypes
  7396. }
  7397. if (iNdEx + skippy) < 0 {
  7398. return ErrInvalidLengthTypes
  7399. }
  7400. if (iNdEx + skippy) > l {
  7401. return io.ErrUnexpectedEOF
  7402. }
  7403. iNdEx += skippy
  7404. }
  7405. }
  7406. if iNdEx > l {
  7407. return io.ErrUnexpectedEOF
  7408. }
  7409. return nil
  7410. }
  7411. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7412. l := len(dAtA)
  7413. iNdEx := 0
  7414. for iNdEx < l {
  7415. preIndex := iNdEx
  7416. var wire uint64
  7417. for shift := uint(0); ; shift += 7 {
  7418. if shift >= 64 {
  7419. return ErrIntOverflowTypes
  7420. }
  7421. if iNdEx >= l {
  7422. return io.ErrUnexpectedEOF
  7423. }
  7424. b := dAtA[iNdEx]
  7425. iNdEx++
  7426. wire |= uint64(b&0x7F) << shift
  7427. if b < 0x80 {
  7428. break
  7429. }
  7430. }
  7431. fieldNum := int32(wire >> 3)
  7432. wireType := int(wire & 0x7)
  7433. if wireType == 4 {
  7434. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7435. }
  7436. if fieldNum <= 0 {
  7437. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7438. }
  7439. switch fieldNum {
  7440. case 1:
  7441. if wireType != 2 {
  7442. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7443. }
  7444. var stringLen uint64
  7445. for shift := uint(0); ; shift += 7 {
  7446. if shift >= 64 {
  7447. return ErrIntOverflowTypes
  7448. }
  7449. if iNdEx >= l {
  7450. return io.ErrUnexpectedEOF
  7451. }
  7452. b := dAtA[iNdEx]
  7453. iNdEx++
  7454. stringLen |= uint64(b&0x7F) << shift
  7455. if b < 0x80 {
  7456. break
  7457. }
  7458. }
  7459. intStringLen := int(stringLen)
  7460. if intStringLen < 0 {
  7461. return ErrInvalidLengthTypes
  7462. }
  7463. postIndex := iNdEx + intStringLen
  7464. if postIndex < 0 {
  7465. return ErrInvalidLengthTypes
  7466. }
  7467. if postIndex > l {
  7468. return io.ErrUnexpectedEOF
  7469. }
  7470. m.Message = string(dAtA[iNdEx:postIndex])
  7471. iNdEx = postIndex
  7472. default:
  7473. iNdEx = preIndex
  7474. skippy, err := skipTypes(dAtA[iNdEx:])
  7475. if err != nil {
  7476. return err
  7477. }
  7478. if skippy < 0 {
  7479. return ErrInvalidLengthTypes
  7480. }
  7481. if (iNdEx + skippy) < 0 {
  7482. return ErrInvalidLengthTypes
  7483. }
  7484. if (iNdEx + skippy) > l {
  7485. return io.ErrUnexpectedEOF
  7486. }
  7487. iNdEx += skippy
  7488. }
  7489. }
  7490. if iNdEx > l {
  7491. return io.ErrUnexpectedEOF
  7492. }
  7493. return nil
  7494. }
  7495. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7496. l := len(dAtA)
  7497. iNdEx := 0
  7498. for iNdEx < l {
  7499. preIndex := iNdEx
  7500. var wire uint64
  7501. for shift := uint(0); ; shift += 7 {
  7502. if shift >= 64 {
  7503. return ErrIntOverflowTypes
  7504. }
  7505. if iNdEx >= l {
  7506. return io.ErrUnexpectedEOF
  7507. }
  7508. b := dAtA[iNdEx]
  7509. iNdEx++
  7510. wire |= uint64(b&0x7F) << shift
  7511. if b < 0x80 {
  7512. break
  7513. }
  7514. }
  7515. fieldNum := int32(wire >> 3)
  7516. wireType := int(wire & 0x7)
  7517. if wireType == 4 {
  7518. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7519. }
  7520. if fieldNum <= 0 {
  7521. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7522. }
  7523. switch fieldNum {
  7524. default:
  7525. iNdEx = preIndex
  7526. skippy, err := skipTypes(dAtA[iNdEx:])
  7527. if err != nil {
  7528. return err
  7529. }
  7530. if skippy < 0 {
  7531. return ErrInvalidLengthTypes
  7532. }
  7533. if (iNdEx + skippy) < 0 {
  7534. return ErrInvalidLengthTypes
  7535. }
  7536. if (iNdEx + skippy) > l {
  7537. return io.ErrUnexpectedEOF
  7538. }
  7539. iNdEx += skippy
  7540. }
  7541. }
  7542. if iNdEx > l {
  7543. return io.ErrUnexpectedEOF
  7544. }
  7545. return nil
  7546. }
  7547. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7548. l := len(dAtA)
  7549. iNdEx := 0
  7550. for iNdEx < l {
  7551. preIndex := iNdEx
  7552. var wire uint64
  7553. for shift := uint(0); ; shift += 7 {
  7554. if shift >= 64 {
  7555. return ErrIntOverflowTypes
  7556. }
  7557. if iNdEx >= l {
  7558. return io.ErrUnexpectedEOF
  7559. }
  7560. b := dAtA[iNdEx]
  7561. iNdEx++
  7562. wire |= uint64(b&0x7F) << shift
  7563. if b < 0x80 {
  7564. break
  7565. }
  7566. }
  7567. fieldNum := int32(wire >> 3)
  7568. wireType := int(wire & 0x7)
  7569. if wireType == 4 {
  7570. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7571. }
  7572. if fieldNum <= 0 {
  7573. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7574. }
  7575. switch fieldNum {
  7576. case 1:
  7577. if wireType != 2 {
  7578. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7579. }
  7580. var stringLen uint64
  7581. for shift := uint(0); ; shift += 7 {
  7582. if shift >= 64 {
  7583. return ErrIntOverflowTypes
  7584. }
  7585. if iNdEx >= l {
  7586. return io.ErrUnexpectedEOF
  7587. }
  7588. b := dAtA[iNdEx]
  7589. iNdEx++
  7590. stringLen |= uint64(b&0x7F) << shift
  7591. if b < 0x80 {
  7592. break
  7593. }
  7594. }
  7595. intStringLen := int(stringLen)
  7596. if intStringLen < 0 {
  7597. return ErrInvalidLengthTypes
  7598. }
  7599. postIndex := iNdEx + intStringLen
  7600. if postIndex < 0 {
  7601. return ErrInvalidLengthTypes
  7602. }
  7603. if postIndex > l {
  7604. return io.ErrUnexpectedEOF
  7605. }
  7606. m.Version = string(dAtA[iNdEx:postIndex])
  7607. iNdEx = postIndex
  7608. case 2:
  7609. if wireType != 0 {
  7610. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7611. }
  7612. m.BlockVersion = 0
  7613. for shift := uint(0); ; shift += 7 {
  7614. if shift >= 64 {
  7615. return ErrIntOverflowTypes
  7616. }
  7617. if iNdEx >= l {
  7618. return io.ErrUnexpectedEOF
  7619. }
  7620. b := dAtA[iNdEx]
  7621. iNdEx++
  7622. m.BlockVersion |= uint64(b&0x7F) << shift
  7623. if b < 0x80 {
  7624. break
  7625. }
  7626. }
  7627. case 3:
  7628. if wireType != 0 {
  7629. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7630. }
  7631. m.P2PVersion = 0
  7632. for shift := uint(0); ; shift += 7 {
  7633. if shift >= 64 {
  7634. return ErrIntOverflowTypes
  7635. }
  7636. if iNdEx >= l {
  7637. return io.ErrUnexpectedEOF
  7638. }
  7639. b := dAtA[iNdEx]
  7640. iNdEx++
  7641. m.P2PVersion |= uint64(b&0x7F) << shift
  7642. if b < 0x80 {
  7643. break
  7644. }
  7645. }
  7646. case 4:
  7647. if wireType != 2 {
  7648. return fmt.Errorf("proto: wrong wireType = %d for field AbciVersion", wireType)
  7649. }
  7650. var stringLen uint64
  7651. for shift := uint(0); ; shift += 7 {
  7652. if shift >= 64 {
  7653. return ErrIntOverflowTypes
  7654. }
  7655. if iNdEx >= l {
  7656. return io.ErrUnexpectedEOF
  7657. }
  7658. b := dAtA[iNdEx]
  7659. iNdEx++
  7660. stringLen |= uint64(b&0x7F) << shift
  7661. if b < 0x80 {
  7662. break
  7663. }
  7664. }
  7665. intStringLen := int(stringLen)
  7666. if intStringLen < 0 {
  7667. return ErrInvalidLengthTypes
  7668. }
  7669. postIndex := iNdEx + intStringLen
  7670. if postIndex < 0 {
  7671. return ErrInvalidLengthTypes
  7672. }
  7673. if postIndex > l {
  7674. return io.ErrUnexpectedEOF
  7675. }
  7676. m.AbciVersion = string(dAtA[iNdEx:postIndex])
  7677. iNdEx = postIndex
  7678. default:
  7679. iNdEx = preIndex
  7680. skippy, err := skipTypes(dAtA[iNdEx:])
  7681. if err != nil {
  7682. return err
  7683. }
  7684. if skippy < 0 {
  7685. return ErrInvalidLengthTypes
  7686. }
  7687. if (iNdEx + skippy) < 0 {
  7688. return ErrInvalidLengthTypes
  7689. }
  7690. if (iNdEx + skippy) > l {
  7691. return io.ErrUnexpectedEOF
  7692. }
  7693. iNdEx += skippy
  7694. }
  7695. }
  7696. if iNdEx > l {
  7697. return io.ErrUnexpectedEOF
  7698. }
  7699. return nil
  7700. }
  7701. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7702. l := len(dAtA)
  7703. iNdEx := 0
  7704. for iNdEx < l {
  7705. preIndex := iNdEx
  7706. var wire uint64
  7707. for shift := uint(0); ; shift += 7 {
  7708. if shift >= 64 {
  7709. return ErrIntOverflowTypes
  7710. }
  7711. if iNdEx >= l {
  7712. return io.ErrUnexpectedEOF
  7713. }
  7714. b := dAtA[iNdEx]
  7715. iNdEx++
  7716. wire |= uint64(b&0x7F) << shift
  7717. if b < 0x80 {
  7718. break
  7719. }
  7720. }
  7721. fieldNum := int32(wire >> 3)
  7722. wireType := int(wire & 0x7)
  7723. if wireType == 4 {
  7724. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7725. }
  7726. if fieldNum <= 0 {
  7727. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7728. }
  7729. switch fieldNum {
  7730. case 1:
  7731. if wireType != 2 {
  7732. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7733. }
  7734. var msglen int
  7735. for shift := uint(0); ; shift += 7 {
  7736. if shift >= 64 {
  7737. return ErrIntOverflowTypes
  7738. }
  7739. if iNdEx >= l {
  7740. return io.ErrUnexpectedEOF
  7741. }
  7742. b := dAtA[iNdEx]
  7743. iNdEx++
  7744. msglen |= int(b&0x7F) << shift
  7745. if b < 0x80 {
  7746. break
  7747. }
  7748. }
  7749. if msglen < 0 {
  7750. return ErrInvalidLengthTypes
  7751. }
  7752. postIndex := iNdEx + msglen
  7753. if postIndex < 0 {
  7754. return ErrInvalidLengthTypes
  7755. }
  7756. if postIndex > l {
  7757. return io.ErrUnexpectedEOF
  7758. }
  7759. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7760. return err
  7761. }
  7762. iNdEx = postIndex
  7763. case 2:
  7764. if wireType != 2 {
  7765. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7766. }
  7767. var stringLen uint64
  7768. for shift := uint(0); ; shift += 7 {
  7769. if shift >= 64 {
  7770. return ErrIntOverflowTypes
  7771. }
  7772. if iNdEx >= l {
  7773. return io.ErrUnexpectedEOF
  7774. }
  7775. b := dAtA[iNdEx]
  7776. iNdEx++
  7777. stringLen |= uint64(b&0x7F) << shift
  7778. if b < 0x80 {
  7779. break
  7780. }
  7781. }
  7782. intStringLen := int(stringLen)
  7783. if intStringLen < 0 {
  7784. return ErrInvalidLengthTypes
  7785. }
  7786. postIndex := iNdEx + intStringLen
  7787. if postIndex < 0 {
  7788. return ErrInvalidLengthTypes
  7789. }
  7790. if postIndex > l {
  7791. return io.ErrUnexpectedEOF
  7792. }
  7793. m.ChainId = string(dAtA[iNdEx:postIndex])
  7794. iNdEx = postIndex
  7795. case 3:
  7796. if wireType != 2 {
  7797. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7798. }
  7799. var msglen int
  7800. for shift := uint(0); ; shift += 7 {
  7801. if shift >= 64 {
  7802. return ErrIntOverflowTypes
  7803. }
  7804. if iNdEx >= l {
  7805. return io.ErrUnexpectedEOF
  7806. }
  7807. b := dAtA[iNdEx]
  7808. iNdEx++
  7809. msglen |= int(b&0x7F) << shift
  7810. if b < 0x80 {
  7811. break
  7812. }
  7813. }
  7814. if msglen < 0 {
  7815. return ErrInvalidLengthTypes
  7816. }
  7817. postIndex := iNdEx + msglen
  7818. if postIndex < 0 {
  7819. return ErrInvalidLengthTypes
  7820. }
  7821. if postIndex > l {
  7822. return io.ErrUnexpectedEOF
  7823. }
  7824. if m.ConsensusParams == nil {
  7825. m.ConsensusParams = &ConsensusParams{}
  7826. }
  7827. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7828. return err
  7829. }
  7830. iNdEx = postIndex
  7831. case 4:
  7832. if wireType != 2 {
  7833. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7834. }
  7835. var msglen int
  7836. for shift := uint(0); ; shift += 7 {
  7837. if shift >= 64 {
  7838. return ErrIntOverflowTypes
  7839. }
  7840. if iNdEx >= l {
  7841. return io.ErrUnexpectedEOF
  7842. }
  7843. b := dAtA[iNdEx]
  7844. iNdEx++
  7845. msglen |= int(b&0x7F) << shift
  7846. if b < 0x80 {
  7847. break
  7848. }
  7849. }
  7850. if msglen < 0 {
  7851. return ErrInvalidLengthTypes
  7852. }
  7853. postIndex := iNdEx + msglen
  7854. if postIndex < 0 {
  7855. return ErrInvalidLengthTypes
  7856. }
  7857. if postIndex > l {
  7858. return io.ErrUnexpectedEOF
  7859. }
  7860. m.Validators = append(m.Validators, ValidatorUpdate{})
  7861. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7862. return err
  7863. }
  7864. iNdEx = postIndex
  7865. case 5:
  7866. if wireType != 2 {
  7867. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7868. }
  7869. var byteLen int
  7870. for shift := uint(0); ; shift += 7 {
  7871. if shift >= 64 {
  7872. return ErrIntOverflowTypes
  7873. }
  7874. if iNdEx >= l {
  7875. return io.ErrUnexpectedEOF
  7876. }
  7877. b := dAtA[iNdEx]
  7878. iNdEx++
  7879. byteLen |= int(b&0x7F) << shift
  7880. if b < 0x80 {
  7881. break
  7882. }
  7883. }
  7884. if byteLen < 0 {
  7885. return ErrInvalidLengthTypes
  7886. }
  7887. postIndex := iNdEx + byteLen
  7888. if postIndex < 0 {
  7889. return ErrInvalidLengthTypes
  7890. }
  7891. if postIndex > l {
  7892. return io.ErrUnexpectedEOF
  7893. }
  7894. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7895. if m.AppStateBytes == nil {
  7896. m.AppStateBytes = []byte{}
  7897. }
  7898. iNdEx = postIndex
  7899. case 6:
  7900. if wireType != 0 {
  7901. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7902. }
  7903. m.InitialHeight = 0
  7904. for shift := uint(0); ; shift += 7 {
  7905. if shift >= 64 {
  7906. return ErrIntOverflowTypes
  7907. }
  7908. if iNdEx >= l {
  7909. return io.ErrUnexpectedEOF
  7910. }
  7911. b := dAtA[iNdEx]
  7912. iNdEx++
  7913. m.InitialHeight |= int64(b&0x7F) << shift
  7914. if b < 0x80 {
  7915. break
  7916. }
  7917. }
  7918. default:
  7919. iNdEx = preIndex
  7920. skippy, err := skipTypes(dAtA[iNdEx:])
  7921. if err != nil {
  7922. return err
  7923. }
  7924. if skippy < 0 {
  7925. return ErrInvalidLengthTypes
  7926. }
  7927. if (iNdEx + skippy) < 0 {
  7928. return ErrInvalidLengthTypes
  7929. }
  7930. if (iNdEx + skippy) > l {
  7931. return io.ErrUnexpectedEOF
  7932. }
  7933. iNdEx += skippy
  7934. }
  7935. }
  7936. if iNdEx > l {
  7937. return io.ErrUnexpectedEOF
  7938. }
  7939. return nil
  7940. }
  7941. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7942. l := len(dAtA)
  7943. iNdEx := 0
  7944. for iNdEx < l {
  7945. preIndex := iNdEx
  7946. var wire uint64
  7947. for shift := uint(0); ; shift += 7 {
  7948. if shift >= 64 {
  7949. return ErrIntOverflowTypes
  7950. }
  7951. if iNdEx >= l {
  7952. return io.ErrUnexpectedEOF
  7953. }
  7954. b := dAtA[iNdEx]
  7955. iNdEx++
  7956. wire |= uint64(b&0x7F) << shift
  7957. if b < 0x80 {
  7958. break
  7959. }
  7960. }
  7961. fieldNum := int32(wire >> 3)
  7962. wireType := int(wire & 0x7)
  7963. if wireType == 4 {
  7964. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7965. }
  7966. if fieldNum <= 0 {
  7967. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7968. }
  7969. switch fieldNum {
  7970. case 1:
  7971. if wireType != 2 {
  7972. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7973. }
  7974. var byteLen int
  7975. for shift := uint(0); ; shift += 7 {
  7976. if shift >= 64 {
  7977. return ErrIntOverflowTypes
  7978. }
  7979. if iNdEx >= l {
  7980. return io.ErrUnexpectedEOF
  7981. }
  7982. b := dAtA[iNdEx]
  7983. iNdEx++
  7984. byteLen |= int(b&0x7F) << shift
  7985. if b < 0x80 {
  7986. break
  7987. }
  7988. }
  7989. if byteLen < 0 {
  7990. return ErrInvalidLengthTypes
  7991. }
  7992. postIndex := iNdEx + byteLen
  7993. if postIndex < 0 {
  7994. return ErrInvalidLengthTypes
  7995. }
  7996. if postIndex > l {
  7997. return io.ErrUnexpectedEOF
  7998. }
  7999. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  8000. if m.Data == nil {
  8001. m.Data = []byte{}
  8002. }
  8003. iNdEx = postIndex
  8004. case 2:
  8005. if wireType != 2 {
  8006. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  8007. }
  8008. var stringLen uint64
  8009. for shift := uint(0); ; shift += 7 {
  8010. if shift >= 64 {
  8011. return ErrIntOverflowTypes
  8012. }
  8013. if iNdEx >= l {
  8014. return io.ErrUnexpectedEOF
  8015. }
  8016. b := dAtA[iNdEx]
  8017. iNdEx++
  8018. stringLen |= uint64(b&0x7F) << shift
  8019. if b < 0x80 {
  8020. break
  8021. }
  8022. }
  8023. intStringLen := int(stringLen)
  8024. if intStringLen < 0 {
  8025. return ErrInvalidLengthTypes
  8026. }
  8027. postIndex := iNdEx + intStringLen
  8028. if postIndex < 0 {
  8029. return ErrInvalidLengthTypes
  8030. }
  8031. if postIndex > l {
  8032. return io.ErrUnexpectedEOF
  8033. }
  8034. m.Path = string(dAtA[iNdEx:postIndex])
  8035. iNdEx = postIndex
  8036. case 3:
  8037. if wireType != 0 {
  8038. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8039. }
  8040. m.Height = 0
  8041. for shift := uint(0); ; shift += 7 {
  8042. if shift >= 64 {
  8043. return ErrIntOverflowTypes
  8044. }
  8045. if iNdEx >= l {
  8046. return io.ErrUnexpectedEOF
  8047. }
  8048. b := dAtA[iNdEx]
  8049. iNdEx++
  8050. m.Height |= int64(b&0x7F) << shift
  8051. if b < 0x80 {
  8052. break
  8053. }
  8054. }
  8055. case 4:
  8056. if wireType != 0 {
  8057. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  8058. }
  8059. var v int
  8060. for shift := uint(0); ; shift += 7 {
  8061. if shift >= 64 {
  8062. return ErrIntOverflowTypes
  8063. }
  8064. if iNdEx >= l {
  8065. return io.ErrUnexpectedEOF
  8066. }
  8067. b := dAtA[iNdEx]
  8068. iNdEx++
  8069. v |= int(b&0x7F) << shift
  8070. if b < 0x80 {
  8071. break
  8072. }
  8073. }
  8074. m.Prove = bool(v != 0)
  8075. default:
  8076. iNdEx = preIndex
  8077. skippy, err := skipTypes(dAtA[iNdEx:])
  8078. if err != nil {
  8079. return err
  8080. }
  8081. if skippy < 0 {
  8082. return ErrInvalidLengthTypes
  8083. }
  8084. if (iNdEx + skippy) < 0 {
  8085. return ErrInvalidLengthTypes
  8086. }
  8087. if (iNdEx + skippy) > l {
  8088. return io.ErrUnexpectedEOF
  8089. }
  8090. iNdEx += skippy
  8091. }
  8092. }
  8093. if iNdEx > l {
  8094. return io.ErrUnexpectedEOF
  8095. }
  8096. return nil
  8097. }
  8098. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  8099. l := len(dAtA)
  8100. iNdEx := 0
  8101. for iNdEx < l {
  8102. preIndex := iNdEx
  8103. var wire uint64
  8104. for shift := uint(0); ; shift += 7 {
  8105. if shift >= 64 {
  8106. return ErrIntOverflowTypes
  8107. }
  8108. if iNdEx >= l {
  8109. return io.ErrUnexpectedEOF
  8110. }
  8111. b := dAtA[iNdEx]
  8112. iNdEx++
  8113. wire |= uint64(b&0x7F) << shift
  8114. if b < 0x80 {
  8115. break
  8116. }
  8117. }
  8118. fieldNum := int32(wire >> 3)
  8119. wireType := int(wire & 0x7)
  8120. if wireType == 4 {
  8121. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  8122. }
  8123. if fieldNum <= 0 {
  8124. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8125. }
  8126. switch fieldNum {
  8127. case 1:
  8128. if wireType != 2 {
  8129. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  8130. }
  8131. var byteLen int
  8132. for shift := uint(0); ; shift += 7 {
  8133. if shift >= 64 {
  8134. return ErrIntOverflowTypes
  8135. }
  8136. if iNdEx >= l {
  8137. return io.ErrUnexpectedEOF
  8138. }
  8139. b := dAtA[iNdEx]
  8140. iNdEx++
  8141. byteLen |= int(b&0x7F) << shift
  8142. if b < 0x80 {
  8143. break
  8144. }
  8145. }
  8146. if byteLen < 0 {
  8147. return ErrInvalidLengthTypes
  8148. }
  8149. postIndex := iNdEx + byteLen
  8150. if postIndex < 0 {
  8151. return ErrInvalidLengthTypes
  8152. }
  8153. if postIndex > l {
  8154. return io.ErrUnexpectedEOF
  8155. }
  8156. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  8157. if m.Hash == nil {
  8158. m.Hash = []byte{}
  8159. }
  8160. iNdEx = postIndex
  8161. case 2:
  8162. if wireType != 2 {
  8163. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8164. }
  8165. var msglen int
  8166. for shift := uint(0); ; shift += 7 {
  8167. if shift >= 64 {
  8168. return ErrIntOverflowTypes
  8169. }
  8170. if iNdEx >= l {
  8171. return io.ErrUnexpectedEOF
  8172. }
  8173. b := dAtA[iNdEx]
  8174. iNdEx++
  8175. msglen |= int(b&0x7F) << shift
  8176. if b < 0x80 {
  8177. break
  8178. }
  8179. }
  8180. if msglen < 0 {
  8181. return ErrInvalidLengthTypes
  8182. }
  8183. postIndex := iNdEx + msglen
  8184. if postIndex < 0 {
  8185. return ErrInvalidLengthTypes
  8186. }
  8187. if postIndex > l {
  8188. return io.ErrUnexpectedEOF
  8189. }
  8190. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8191. return err
  8192. }
  8193. iNdEx = postIndex
  8194. case 3:
  8195. if wireType != 2 {
  8196. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  8197. }
  8198. var msglen int
  8199. for shift := uint(0); ; shift += 7 {
  8200. if shift >= 64 {
  8201. return ErrIntOverflowTypes
  8202. }
  8203. if iNdEx >= l {
  8204. return io.ErrUnexpectedEOF
  8205. }
  8206. b := dAtA[iNdEx]
  8207. iNdEx++
  8208. msglen |= int(b&0x7F) << shift
  8209. if b < 0x80 {
  8210. break
  8211. }
  8212. }
  8213. if msglen < 0 {
  8214. return ErrInvalidLengthTypes
  8215. }
  8216. postIndex := iNdEx + msglen
  8217. if postIndex < 0 {
  8218. return ErrInvalidLengthTypes
  8219. }
  8220. if postIndex > l {
  8221. return io.ErrUnexpectedEOF
  8222. }
  8223. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8224. return err
  8225. }
  8226. iNdEx = postIndex
  8227. case 4:
  8228. if wireType != 2 {
  8229. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8230. }
  8231. var msglen int
  8232. for shift := uint(0); ; shift += 7 {
  8233. if shift >= 64 {
  8234. return ErrIntOverflowTypes
  8235. }
  8236. if iNdEx >= l {
  8237. return io.ErrUnexpectedEOF
  8238. }
  8239. b := dAtA[iNdEx]
  8240. iNdEx++
  8241. msglen |= int(b&0x7F) << shift
  8242. if b < 0x80 {
  8243. break
  8244. }
  8245. }
  8246. if msglen < 0 {
  8247. return ErrInvalidLengthTypes
  8248. }
  8249. postIndex := iNdEx + msglen
  8250. if postIndex < 0 {
  8251. return ErrInvalidLengthTypes
  8252. }
  8253. if postIndex > l {
  8254. return io.ErrUnexpectedEOF
  8255. }
  8256. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8257. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8258. return err
  8259. }
  8260. iNdEx = postIndex
  8261. default:
  8262. iNdEx = preIndex
  8263. skippy, err := skipTypes(dAtA[iNdEx:])
  8264. if err != nil {
  8265. return err
  8266. }
  8267. if skippy < 0 {
  8268. return ErrInvalidLengthTypes
  8269. }
  8270. if (iNdEx + skippy) < 0 {
  8271. return ErrInvalidLengthTypes
  8272. }
  8273. if (iNdEx + skippy) > l {
  8274. return io.ErrUnexpectedEOF
  8275. }
  8276. iNdEx += skippy
  8277. }
  8278. }
  8279. if iNdEx > l {
  8280. return io.ErrUnexpectedEOF
  8281. }
  8282. return nil
  8283. }
  8284. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8285. l := len(dAtA)
  8286. iNdEx := 0
  8287. for iNdEx < l {
  8288. preIndex := iNdEx
  8289. var wire uint64
  8290. for shift := uint(0); ; shift += 7 {
  8291. if shift >= 64 {
  8292. return ErrIntOverflowTypes
  8293. }
  8294. if iNdEx >= l {
  8295. return io.ErrUnexpectedEOF
  8296. }
  8297. b := dAtA[iNdEx]
  8298. iNdEx++
  8299. wire |= uint64(b&0x7F) << shift
  8300. if b < 0x80 {
  8301. break
  8302. }
  8303. }
  8304. fieldNum := int32(wire >> 3)
  8305. wireType := int(wire & 0x7)
  8306. if wireType == 4 {
  8307. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8308. }
  8309. if fieldNum <= 0 {
  8310. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8311. }
  8312. switch fieldNum {
  8313. case 1:
  8314. if wireType != 2 {
  8315. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8316. }
  8317. var byteLen int
  8318. for shift := uint(0); ; shift += 7 {
  8319. if shift >= 64 {
  8320. return ErrIntOverflowTypes
  8321. }
  8322. if iNdEx >= l {
  8323. return io.ErrUnexpectedEOF
  8324. }
  8325. b := dAtA[iNdEx]
  8326. iNdEx++
  8327. byteLen |= int(b&0x7F) << shift
  8328. if b < 0x80 {
  8329. break
  8330. }
  8331. }
  8332. if byteLen < 0 {
  8333. return ErrInvalidLengthTypes
  8334. }
  8335. postIndex := iNdEx + byteLen
  8336. if postIndex < 0 {
  8337. return ErrInvalidLengthTypes
  8338. }
  8339. if postIndex > l {
  8340. return io.ErrUnexpectedEOF
  8341. }
  8342. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8343. if m.Tx == nil {
  8344. m.Tx = []byte{}
  8345. }
  8346. iNdEx = postIndex
  8347. case 2:
  8348. if wireType != 0 {
  8349. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8350. }
  8351. m.Type = 0
  8352. for shift := uint(0); ; shift += 7 {
  8353. if shift >= 64 {
  8354. return ErrIntOverflowTypes
  8355. }
  8356. if iNdEx >= l {
  8357. return io.ErrUnexpectedEOF
  8358. }
  8359. b := dAtA[iNdEx]
  8360. iNdEx++
  8361. m.Type |= CheckTxType(b&0x7F) << shift
  8362. if b < 0x80 {
  8363. break
  8364. }
  8365. }
  8366. default:
  8367. iNdEx = preIndex
  8368. skippy, err := skipTypes(dAtA[iNdEx:])
  8369. if err != nil {
  8370. return err
  8371. }
  8372. if skippy < 0 {
  8373. return ErrInvalidLengthTypes
  8374. }
  8375. if (iNdEx + skippy) < 0 {
  8376. return ErrInvalidLengthTypes
  8377. }
  8378. if (iNdEx + skippy) > l {
  8379. return io.ErrUnexpectedEOF
  8380. }
  8381. iNdEx += skippy
  8382. }
  8383. }
  8384. if iNdEx > l {
  8385. return io.ErrUnexpectedEOF
  8386. }
  8387. return nil
  8388. }
  8389. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8390. l := len(dAtA)
  8391. iNdEx := 0
  8392. for iNdEx < l {
  8393. preIndex := iNdEx
  8394. var wire uint64
  8395. for shift := uint(0); ; shift += 7 {
  8396. if shift >= 64 {
  8397. return ErrIntOverflowTypes
  8398. }
  8399. if iNdEx >= l {
  8400. return io.ErrUnexpectedEOF
  8401. }
  8402. b := dAtA[iNdEx]
  8403. iNdEx++
  8404. wire |= uint64(b&0x7F) << shift
  8405. if b < 0x80 {
  8406. break
  8407. }
  8408. }
  8409. fieldNum := int32(wire >> 3)
  8410. wireType := int(wire & 0x7)
  8411. if wireType == 4 {
  8412. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8413. }
  8414. if fieldNum <= 0 {
  8415. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8416. }
  8417. switch fieldNum {
  8418. case 1:
  8419. if wireType != 2 {
  8420. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8421. }
  8422. var byteLen int
  8423. for shift := uint(0); ; shift += 7 {
  8424. if shift >= 64 {
  8425. return ErrIntOverflowTypes
  8426. }
  8427. if iNdEx >= l {
  8428. return io.ErrUnexpectedEOF
  8429. }
  8430. b := dAtA[iNdEx]
  8431. iNdEx++
  8432. byteLen |= int(b&0x7F) << shift
  8433. if b < 0x80 {
  8434. break
  8435. }
  8436. }
  8437. if byteLen < 0 {
  8438. return ErrInvalidLengthTypes
  8439. }
  8440. postIndex := iNdEx + byteLen
  8441. if postIndex < 0 {
  8442. return ErrInvalidLengthTypes
  8443. }
  8444. if postIndex > l {
  8445. return io.ErrUnexpectedEOF
  8446. }
  8447. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8448. if m.Tx == nil {
  8449. m.Tx = []byte{}
  8450. }
  8451. iNdEx = postIndex
  8452. default:
  8453. iNdEx = preIndex
  8454. skippy, err := skipTypes(dAtA[iNdEx:])
  8455. if err != nil {
  8456. return err
  8457. }
  8458. if skippy < 0 {
  8459. return ErrInvalidLengthTypes
  8460. }
  8461. if (iNdEx + skippy) < 0 {
  8462. return ErrInvalidLengthTypes
  8463. }
  8464. if (iNdEx + skippy) > l {
  8465. return io.ErrUnexpectedEOF
  8466. }
  8467. iNdEx += skippy
  8468. }
  8469. }
  8470. if iNdEx > l {
  8471. return io.ErrUnexpectedEOF
  8472. }
  8473. return nil
  8474. }
  8475. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8476. l := len(dAtA)
  8477. iNdEx := 0
  8478. for iNdEx < l {
  8479. preIndex := iNdEx
  8480. var wire uint64
  8481. for shift := uint(0); ; shift += 7 {
  8482. if shift >= 64 {
  8483. return ErrIntOverflowTypes
  8484. }
  8485. if iNdEx >= l {
  8486. return io.ErrUnexpectedEOF
  8487. }
  8488. b := dAtA[iNdEx]
  8489. iNdEx++
  8490. wire |= uint64(b&0x7F) << shift
  8491. if b < 0x80 {
  8492. break
  8493. }
  8494. }
  8495. fieldNum := int32(wire >> 3)
  8496. wireType := int(wire & 0x7)
  8497. if wireType == 4 {
  8498. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8499. }
  8500. if fieldNum <= 0 {
  8501. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8502. }
  8503. switch fieldNum {
  8504. case 1:
  8505. if wireType != 0 {
  8506. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8507. }
  8508. m.Height = 0
  8509. for shift := uint(0); ; shift += 7 {
  8510. if shift >= 64 {
  8511. return ErrIntOverflowTypes
  8512. }
  8513. if iNdEx >= l {
  8514. return io.ErrUnexpectedEOF
  8515. }
  8516. b := dAtA[iNdEx]
  8517. iNdEx++
  8518. m.Height |= int64(b&0x7F) << shift
  8519. if b < 0x80 {
  8520. break
  8521. }
  8522. }
  8523. default:
  8524. iNdEx = preIndex
  8525. skippy, err := skipTypes(dAtA[iNdEx:])
  8526. if err != nil {
  8527. return err
  8528. }
  8529. if skippy < 0 {
  8530. return ErrInvalidLengthTypes
  8531. }
  8532. if (iNdEx + skippy) < 0 {
  8533. return ErrInvalidLengthTypes
  8534. }
  8535. if (iNdEx + skippy) > l {
  8536. return io.ErrUnexpectedEOF
  8537. }
  8538. iNdEx += skippy
  8539. }
  8540. }
  8541. if iNdEx > l {
  8542. return io.ErrUnexpectedEOF
  8543. }
  8544. return nil
  8545. }
  8546. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8547. l := len(dAtA)
  8548. iNdEx := 0
  8549. for iNdEx < l {
  8550. preIndex := iNdEx
  8551. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  8562. if b < 0x80 {
  8563. break
  8564. }
  8565. }
  8566. fieldNum := int32(wire >> 3)
  8567. wireType := int(wire & 0x7)
  8568. if wireType == 4 {
  8569. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8570. }
  8571. if fieldNum <= 0 {
  8572. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8573. }
  8574. switch fieldNum {
  8575. default:
  8576. iNdEx = preIndex
  8577. skippy, err := skipTypes(dAtA[iNdEx:])
  8578. if err != nil {
  8579. return err
  8580. }
  8581. if skippy < 0 {
  8582. return ErrInvalidLengthTypes
  8583. }
  8584. if (iNdEx + skippy) < 0 {
  8585. return ErrInvalidLengthTypes
  8586. }
  8587. if (iNdEx + skippy) > l {
  8588. return io.ErrUnexpectedEOF
  8589. }
  8590. iNdEx += skippy
  8591. }
  8592. }
  8593. if iNdEx > l {
  8594. return io.ErrUnexpectedEOF
  8595. }
  8596. return nil
  8597. }
  8598. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  8599. l := len(dAtA)
  8600. iNdEx := 0
  8601. for iNdEx < l {
  8602. preIndex := iNdEx
  8603. var wire uint64
  8604. for shift := uint(0); ; shift += 7 {
  8605. if shift >= 64 {
  8606. return ErrIntOverflowTypes
  8607. }
  8608. if iNdEx >= l {
  8609. return io.ErrUnexpectedEOF
  8610. }
  8611. b := dAtA[iNdEx]
  8612. iNdEx++
  8613. wire |= uint64(b&0x7F) << shift
  8614. if b < 0x80 {
  8615. break
  8616. }
  8617. }
  8618. fieldNum := int32(wire >> 3)
  8619. wireType := int(wire & 0x7)
  8620. if wireType == 4 {
  8621. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  8622. }
  8623. if fieldNum <= 0 {
  8624. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  8625. }
  8626. switch fieldNum {
  8627. default:
  8628. iNdEx = preIndex
  8629. skippy, err := skipTypes(dAtA[iNdEx:])
  8630. if err != nil {
  8631. return err
  8632. }
  8633. if skippy < 0 {
  8634. return ErrInvalidLengthTypes
  8635. }
  8636. if (iNdEx + skippy) < 0 {
  8637. return ErrInvalidLengthTypes
  8638. }
  8639. if (iNdEx + skippy) > l {
  8640. return io.ErrUnexpectedEOF
  8641. }
  8642. iNdEx += skippy
  8643. }
  8644. }
  8645. if iNdEx > l {
  8646. return io.ErrUnexpectedEOF
  8647. }
  8648. return nil
  8649. }
  8650. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  8651. l := len(dAtA)
  8652. iNdEx := 0
  8653. for iNdEx < l {
  8654. preIndex := iNdEx
  8655. var wire uint64
  8656. for shift := uint(0); ; shift += 7 {
  8657. if shift >= 64 {
  8658. return ErrIntOverflowTypes
  8659. }
  8660. if iNdEx >= l {
  8661. return io.ErrUnexpectedEOF
  8662. }
  8663. b := dAtA[iNdEx]
  8664. iNdEx++
  8665. wire |= uint64(b&0x7F) << shift
  8666. if b < 0x80 {
  8667. break
  8668. }
  8669. }
  8670. fieldNum := int32(wire >> 3)
  8671. wireType := int(wire & 0x7)
  8672. if wireType == 4 {
  8673. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  8674. }
  8675. if fieldNum <= 0 {
  8676. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8677. }
  8678. switch fieldNum {
  8679. case 1:
  8680. if wireType != 2 {
  8681. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8682. }
  8683. var msglen int
  8684. for shift := uint(0); ; shift += 7 {
  8685. if shift >= 64 {
  8686. return ErrIntOverflowTypes
  8687. }
  8688. if iNdEx >= l {
  8689. return io.ErrUnexpectedEOF
  8690. }
  8691. b := dAtA[iNdEx]
  8692. iNdEx++
  8693. msglen |= int(b&0x7F) << shift
  8694. if b < 0x80 {
  8695. break
  8696. }
  8697. }
  8698. if msglen < 0 {
  8699. return ErrInvalidLengthTypes
  8700. }
  8701. postIndex := iNdEx + msglen
  8702. if postIndex < 0 {
  8703. return ErrInvalidLengthTypes
  8704. }
  8705. if postIndex > l {
  8706. return io.ErrUnexpectedEOF
  8707. }
  8708. if m.Snapshot == nil {
  8709. m.Snapshot = &Snapshot{}
  8710. }
  8711. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8712. return err
  8713. }
  8714. iNdEx = postIndex
  8715. case 2:
  8716. if wireType != 2 {
  8717. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8718. }
  8719. var byteLen int
  8720. for shift := uint(0); ; shift += 7 {
  8721. if shift >= 64 {
  8722. return ErrIntOverflowTypes
  8723. }
  8724. if iNdEx >= l {
  8725. return io.ErrUnexpectedEOF
  8726. }
  8727. b := dAtA[iNdEx]
  8728. iNdEx++
  8729. byteLen |= int(b&0x7F) << shift
  8730. if b < 0x80 {
  8731. break
  8732. }
  8733. }
  8734. if byteLen < 0 {
  8735. return ErrInvalidLengthTypes
  8736. }
  8737. postIndex := iNdEx + byteLen
  8738. if postIndex < 0 {
  8739. return ErrInvalidLengthTypes
  8740. }
  8741. if postIndex > l {
  8742. return io.ErrUnexpectedEOF
  8743. }
  8744. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8745. if m.AppHash == nil {
  8746. m.AppHash = []byte{}
  8747. }
  8748. iNdEx = postIndex
  8749. default:
  8750. iNdEx = preIndex
  8751. skippy, err := skipTypes(dAtA[iNdEx:])
  8752. if err != nil {
  8753. return err
  8754. }
  8755. if skippy < 0 {
  8756. return ErrInvalidLengthTypes
  8757. }
  8758. if (iNdEx + skippy) < 0 {
  8759. return ErrInvalidLengthTypes
  8760. }
  8761. if (iNdEx + skippy) > l {
  8762. return io.ErrUnexpectedEOF
  8763. }
  8764. iNdEx += skippy
  8765. }
  8766. }
  8767. if iNdEx > l {
  8768. return io.ErrUnexpectedEOF
  8769. }
  8770. return nil
  8771. }
  8772. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8773. l := len(dAtA)
  8774. iNdEx := 0
  8775. for iNdEx < l {
  8776. preIndex := iNdEx
  8777. var wire uint64
  8778. for shift := uint(0); ; shift += 7 {
  8779. if shift >= 64 {
  8780. return ErrIntOverflowTypes
  8781. }
  8782. if iNdEx >= l {
  8783. return io.ErrUnexpectedEOF
  8784. }
  8785. b := dAtA[iNdEx]
  8786. iNdEx++
  8787. wire |= uint64(b&0x7F) << shift
  8788. if b < 0x80 {
  8789. break
  8790. }
  8791. }
  8792. fieldNum := int32(wire >> 3)
  8793. wireType := int(wire & 0x7)
  8794. if wireType == 4 {
  8795. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8796. }
  8797. if fieldNum <= 0 {
  8798. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8799. }
  8800. switch fieldNum {
  8801. case 1:
  8802. if wireType != 0 {
  8803. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8804. }
  8805. m.Height = 0
  8806. for shift := uint(0); ; shift += 7 {
  8807. if shift >= 64 {
  8808. return ErrIntOverflowTypes
  8809. }
  8810. if iNdEx >= l {
  8811. return io.ErrUnexpectedEOF
  8812. }
  8813. b := dAtA[iNdEx]
  8814. iNdEx++
  8815. m.Height |= uint64(b&0x7F) << shift
  8816. if b < 0x80 {
  8817. break
  8818. }
  8819. }
  8820. case 2:
  8821. if wireType != 0 {
  8822. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8823. }
  8824. m.Format = 0
  8825. for shift := uint(0); ; shift += 7 {
  8826. if shift >= 64 {
  8827. return ErrIntOverflowTypes
  8828. }
  8829. if iNdEx >= l {
  8830. return io.ErrUnexpectedEOF
  8831. }
  8832. b := dAtA[iNdEx]
  8833. iNdEx++
  8834. m.Format |= uint32(b&0x7F) << shift
  8835. if b < 0x80 {
  8836. break
  8837. }
  8838. }
  8839. case 3:
  8840. if wireType != 0 {
  8841. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8842. }
  8843. m.Chunk = 0
  8844. for shift := uint(0); ; shift += 7 {
  8845. if shift >= 64 {
  8846. return ErrIntOverflowTypes
  8847. }
  8848. if iNdEx >= l {
  8849. return io.ErrUnexpectedEOF
  8850. }
  8851. b := dAtA[iNdEx]
  8852. iNdEx++
  8853. m.Chunk |= uint32(b&0x7F) << shift
  8854. if b < 0x80 {
  8855. break
  8856. }
  8857. }
  8858. default:
  8859. iNdEx = preIndex
  8860. skippy, err := skipTypes(dAtA[iNdEx:])
  8861. if err != nil {
  8862. return err
  8863. }
  8864. if skippy < 0 {
  8865. return ErrInvalidLengthTypes
  8866. }
  8867. if (iNdEx + skippy) < 0 {
  8868. return ErrInvalidLengthTypes
  8869. }
  8870. if (iNdEx + skippy) > l {
  8871. return io.ErrUnexpectedEOF
  8872. }
  8873. iNdEx += skippy
  8874. }
  8875. }
  8876. if iNdEx > l {
  8877. return io.ErrUnexpectedEOF
  8878. }
  8879. return nil
  8880. }
  8881. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8882. l := len(dAtA)
  8883. iNdEx := 0
  8884. for iNdEx < l {
  8885. preIndex := iNdEx
  8886. var wire uint64
  8887. for shift := uint(0); ; shift += 7 {
  8888. if shift >= 64 {
  8889. return ErrIntOverflowTypes
  8890. }
  8891. if iNdEx >= l {
  8892. return io.ErrUnexpectedEOF
  8893. }
  8894. b := dAtA[iNdEx]
  8895. iNdEx++
  8896. wire |= uint64(b&0x7F) << shift
  8897. if b < 0x80 {
  8898. break
  8899. }
  8900. }
  8901. fieldNum := int32(wire >> 3)
  8902. wireType := int(wire & 0x7)
  8903. if wireType == 4 {
  8904. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8905. }
  8906. if fieldNum <= 0 {
  8907. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8908. }
  8909. switch fieldNum {
  8910. case 1:
  8911. if wireType != 0 {
  8912. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8913. }
  8914. m.Index = 0
  8915. for shift := uint(0); ; shift += 7 {
  8916. if shift >= 64 {
  8917. return ErrIntOverflowTypes
  8918. }
  8919. if iNdEx >= l {
  8920. return io.ErrUnexpectedEOF
  8921. }
  8922. b := dAtA[iNdEx]
  8923. iNdEx++
  8924. m.Index |= uint32(b&0x7F) << shift
  8925. if b < 0x80 {
  8926. break
  8927. }
  8928. }
  8929. case 2:
  8930. if wireType != 2 {
  8931. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8932. }
  8933. var byteLen int
  8934. for shift := uint(0); ; shift += 7 {
  8935. if shift >= 64 {
  8936. return ErrIntOverflowTypes
  8937. }
  8938. if iNdEx >= l {
  8939. return io.ErrUnexpectedEOF
  8940. }
  8941. b := dAtA[iNdEx]
  8942. iNdEx++
  8943. byteLen |= int(b&0x7F) << shift
  8944. if b < 0x80 {
  8945. break
  8946. }
  8947. }
  8948. if byteLen < 0 {
  8949. return ErrInvalidLengthTypes
  8950. }
  8951. postIndex := iNdEx + byteLen
  8952. if postIndex < 0 {
  8953. return ErrInvalidLengthTypes
  8954. }
  8955. if postIndex > l {
  8956. return io.ErrUnexpectedEOF
  8957. }
  8958. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8959. if m.Chunk == nil {
  8960. m.Chunk = []byte{}
  8961. }
  8962. iNdEx = postIndex
  8963. case 3:
  8964. if wireType != 2 {
  8965. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8966. }
  8967. var stringLen uint64
  8968. for shift := uint(0); ; shift += 7 {
  8969. if shift >= 64 {
  8970. return ErrIntOverflowTypes
  8971. }
  8972. if iNdEx >= l {
  8973. return io.ErrUnexpectedEOF
  8974. }
  8975. b := dAtA[iNdEx]
  8976. iNdEx++
  8977. stringLen |= uint64(b&0x7F) << shift
  8978. if b < 0x80 {
  8979. break
  8980. }
  8981. }
  8982. intStringLen := int(stringLen)
  8983. if intStringLen < 0 {
  8984. return ErrInvalidLengthTypes
  8985. }
  8986. postIndex := iNdEx + intStringLen
  8987. if postIndex < 0 {
  8988. return ErrInvalidLengthTypes
  8989. }
  8990. if postIndex > l {
  8991. return io.ErrUnexpectedEOF
  8992. }
  8993. m.Sender = string(dAtA[iNdEx:postIndex])
  8994. iNdEx = postIndex
  8995. default:
  8996. iNdEx = preIndex
  8997. skippy, err := skipTypes(dAtA[iNdEx:])
  8998. if err != nil {
  8999. return err
  9000. }
  9001. if skippy < 0 {
  9002. return ErrInvalidLengthTypes
  9003. }
  9004. if (iNdEx + skippy) < 0 {
  9005. return ErrInvalidLengthTypes
  9006. }
  9007. if (iNdEx + skippy) > l {
  9008. return io.ErrUnexpectedEOF
  9009. }
  9010. iNdEx += skippy
  9011. }
  9012. }
  9013. if iNdEx > l {
  9014. return io.ErrUnexpectedEOF
  9015. }
  9016. return nil
  9017. }
  9018. func (m *Response) Unmarshal(dAtA []byte) error {
  9019. l := len(dAtA)
  9020. iNdEx := 0
  9021. for iNdEx < l {
  9022. preIndex := iNdEx
  9023. var wire uint64
  9024. for shift := uint(0); ; shift += 7 {
  9025. if shift >= 64 {
  9026. return ErrIntOverflowTypes
  9027. }
  9028. if iNdEx >= l {
  9029. return io.ErrUnexpectedEOF
  9030. }
  9031. b := dAtA[iNdEx]
  9032. iNdEx++
  9033. wire |= uint64(b&0x7F) << shift
  9034. if b < 0x80 {
  9035. break
  9036. }
  9037. }
  9038. fieldNum := int32(wire >> 3)
  9039. wireType := int(wire & 0x7)
  9040. if wireType == 4 {
  9041. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  9042. }
  9043. if fieldNum <= 0 {
  9044. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  9045. }
  9046. switch fieldNum {
  9047. case 1:
  9048. if wireType != 2 {
  9049. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  9050. }
  9051. var msglen int
  9052. for shift := uint(0); ; shift += 7 {
  9053. if shift >= 64 {
  9054. return ErrIntOverflowTypes
  9055. }
  9056. if iNdEx >= l {
  9057. return io.ErrUnexpectedEOF
  9058. }
  9059. b := dAtA[iNdEx]
  9060. iNdEx++
  9061. msglen |= int(b&0x7F) << shift
  9062. if b < 0x80 {
  9063. break
  9064. }
  9065. }
  9066. if msglen < 0 {
  9067. return ErrInvalidLengthTypes
  9068. }
  9069. postIndex := iNdEx + msglen
  9070. if postIndex < 0 {
  9071. return ErrInvalidLengthTypes
  9072. }
  9073. if postIndex > l {
  9074. return io.ErrUnexpectedEOF
  9075. }
  9076. v := &ResponseException{}
  9077. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9078. return err
  9079. }
  9080. m.Value = &Response_Exception{v}
  9081. iNdEx = postIndex
  9082. case 2:
  9083. if wireType != 2 {
  9084. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  9085. }
  9086. var msglen int
  9087. for shift := uint(0); ; shift += 7 {
  9088. if shift >= 64 {
  9089. return ErrIntOverflowTypes
  9090. }
  9091. if iNdEx >= l {
  9092. return io.ErrUnexpectedEOF
  9093. }
  9094. b := dAtA[iNdEx]
  9095. iNdEx++
  9096. msglen |= int(b&0x7F) << shift
  9097. if b < 0x80 {
  9098. break
  9099. }
  9100. }
  9101. if msglen < 0 {
  9102. return ErrInvalidLengthTypes
  9103. }
  9104. postIndex := iNdEx + msglen
  9105. if postIndex < 0 {
  9106. return ErrInvalidLengthTypes
  9107. }
  9108. if postIndex > l {
  9109. return io.ErrUnexpectedEOF
  9110. }
  9111. v := &ResponseEcho{}
  9112. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9113. return err
  9114. }
  9115. m.Value = &Response_Echo{v}
  9116. iNdEx = postIndex
  9117. case 3:
  9118. if wireType != 2 {
  9119. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  9120. }
  9121. var msglen 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. msglen |= int(b&0x7F) << shift
  9132. if b < 0x80 {
  9133. break
  9134. }
  9135. }
  9136. if msglen < 0 {
  9137. return ErrInvalidLengthTypes
  9138. }
  9139. postIndex := iNdEx + msglen
  9140. if postIndex < 0 {
  9141. return ErrInvalidLengthTypes
  9142. }
  9143. if postIndex > l {
  9144. return io.ErrUnexpectedEOF
  9145. }
  9146. v := &ResponseFlush{}
  9147. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9148. return err
  9149. }
  9150. m.Value = &Response_Flush{v}
  9151. iNdEx = postIndex
  9152. case 4:
  9153. if wireType != 2 {
  9154. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9155. }
  9156. var msglen int
  9157. for shift := uint(0); ; shift += 7 {
  9158. if shift >= 64 {
  9159. return ErrIntOverflowTypes
  9160. }
  9161. if iNdEx >= l {
  9162. return io.ErrUnexpectedEOF
  9163. }
  9164. b := dAtA[iNdEx]
  9165. iNdEx++
  9166. msglen |= int(b&0x7F) << shift
  9167. if b < 0x80 {
  9168. break
  9169. }
  9170. }
  9171. if msglen < 0 {
  9172. return ErrInvalidLengthTypes
  9173. }
  9174. postIndex := iNdEx + msglen
  9175. if postIndex < 0 {
  9176. return ErrInvalidLengthTypes
  9177. }
  9178. if postIndex > l {
  9179. return io.ErrUnexpectedEOF
  9180. }
  9181. v := &ResponseInfo{}
  9182. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9183. return err
  9184. }
  9185. m.Value = &Response_Info{v}
  9186. iNdEx = postIndex
  9187. case 5:
  9188. if wireType != 2 {
  9189. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  9190. }
  9191. var msglen int
  9192. for shift := uint(0); ; shift += 7 {
  9193. if shift >= 64 {
  9194. return ErrIntOverflowTypes
  9195. }
  9196. if iNdEx >= l {
  9197. return io.ErrUnexpectedEOF
  9198. }
  9199. b := dAtA[iNdEx]
  9200. iNdEx++
  9201. msglen |= int(b&0x7F) << shift
  9202. if b < 0x80 {
  9203. break
  9204. }
  9205. }
  9206. if msglen < 0 {
  9207. return ErrInvalidLengthTypes
  9208. }
  9209. postIndex := iNdEx + msglen
  9210. if postIndex < 0 {
  9211. return ErrInvalidLengthTypes
  9212. }
  9213. if postIndex > l {
  9214. return io.ErrUnexpectedEOF
  9215. }
  9216. v := &ResponseInitChain{}
  9217. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9218. return err
  9219. }
  9220. m.Value = &Response_InitChain{v}
  9221. iNdEx = postIndex
  9222. case 6:
  9223. if wireType != 2 {
  9224. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  9225. }
  9226. var msglen int
  9227. for shift := uint(0); ; shift += 7 {
  9228. if shift >= 64 {
  9229. return ErrIntOverflowTypes
  9230. }
  9231. if iNdEx >= l {
  9232. return io.ErrUnexpectedEOF
  9233. }
  9234. b := dAtA[iNdEx]
  9235. iNdEx++
  9236. msglen |= int(b&0x7F) << shift
  9237. if b < 0x80 {
  9238. break
  9239. }
  9240. }
  9241. if msglen < 0 {
  9242. return ErrInvalidLengthTypes
  9243. }
  9244. postIndex := iNdEx + msglen
  9245. if postIndex < 0 {
  9246. return ErrInvalidLengthTypes
  9247. }
  9248. if postIndex > l {
  9249. return io.ErrUnexpectedEOF
  9250. }
  9251. v := &ResponseQuery{}
  9252. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9253. return err
  9254. }
  9255. m.Value = &Response_Query{v}
  9256. iNdEx = postIndex
  9257. case 7:
  9258. if wireType != 2 {
  9259. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9260. }
  9261. var msglen int
  9262. for shift := uint(0); ; shift += 7 {
  9263. if shift >= 64 {
  9264. return ErrIntOverflowTypes
  9265. }
  9266. if iNdEx >= l {
  9267. return io.ErrUnexpectedEOF
  9268. }
  9269. b := dAtA[iNdEx]
  9270. iNdEx++
  9271. msglen |= int(b&0x7F) << shift
  9272. if b < 0x80 {
  9273. break
  9274. }
  9275. }
  9276. if msglen < 0 {
  9277. return ErrInvalidLengthTypes
  9278. }
  9279. postIndex := iNdEx + msglen
  9280. if postIndex < 0 {
  9281. return ErrInvalidLengthTypes
  9282. }
  9283. if postIndex > l {
  9284. return io.ErrUnexpectedEOF
  9285. }
  9286. v := &ResponseBeginBlock{}
  9287. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9288. return err
  9289. }
  9290. m.Value = &Response_BeginBlock{v}
  9291. iNdEx = postIndex
  9292. case 8:
  9293. if wireType != 2 {
  9294. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9295. }
  9296. var msglen int
  9297. for shift := uint(0); ; shift += 7 {
  9298. if shift >= 64 {
  9299. return ErrIntOverflowTypes
  9300. }
  9301. if iNdEx >= l {
  9302. return io.ErrUnexpectedEOF
  9303. }
  9304. b := dAtA[iNdEx]
  9305. iNdEx++
  9306. msglen |= int(b&0x7F) << shift
  9307. if b < 0x80 {
  9308. break
  9309. }
  9310. }
  9311. if msglen < 0 {
  9312. return ErrInvalidLengthTypes
  9313. }
  9314. postIndex := iNdEx + msglen
  9315. if postIndex < 0 {
  9316. return ErrInvalidLengthTypes
  9317. }
  9318. if postIndex > l {
  9319. return io.ErrUnexpectedEOF
  9320. }
  9321. v := &ResponseCheckTx{}
  9322. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9323. return err
  9324. }
  9325. m.Value = &Response_CheckTx{v}
  9326. iNdEx = postIndex
  9327. case 9:
  9328. if wireType != 2 {
  9329. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9330. }
  9331. var msglen int
  9332. for shift := uint(0); ; shift += 7 {
  9333. if shift >= 64 {
  9334. return ErrIntOverflowTypes
  9335. }
  9336. if iNdEx >= l {
  9337. return io.ErrUnexpectedEOF
  9338. }
  9339. b := dAtA[iNdEx]
  9340. iNdEx++
  9341. msglen |= int(b&0x7F) << shift
  9342. if b < 0x80 {
  9343. break
  9344. }
  9345. }
  9346. if msglen < 0 {
  9347. return ErrInvalidLengthTypes
  9348. }
  9349. postIndex := iNdEx + msglen
  9350. if postIndex < 0 {
  9351. return ErrInvalidLengthTypes
  9352. }
  9353. if postIndex > l {
  9354. return io.ErrUnexpectedEOF
  9355. }
  9356. v := &ResponseDeliverTx{}
  9357. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9358. return err
  9359. }
  9360. m.Value = &Response_DeliverTx{v}
  9361. iNdEx = postIndex
  9362. case 10:
  9363. if wireType != 2 {
  9364. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9365. }
  9366. var msglen int
  9367. for shift := uint(0); ; shift += 7 {
  9368. if shift >= 64 {
  9369. return ErrIntOverflowTypes
  9370. }
  9371. if iNdEx >= l {
  9372. return io.ErrUnexpectedEOF
  9373. }
  9374. b := dAtA[iNdEx]
  9375. iNdEx++
  9376. msglen |= int(b&0x7F) << shift
  9377. if b < 0x80 {
  9378. break
  9379. }
  9380. }
  9381. if msglen < 0 {
  9382. return ErrInvalidLengthTypes
  9383. }
  9384. postIndex := iNdEx + msglen
  9385. if postIndex < 0 {
  9386. return ErrInvalidLengthTypes
  9387. }
  9388. if postIndex > l {
  9389. return io.ErrUnexpectedEOF
  9390. }
  9391. v := &ResponseEndBlock{}
  9392. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9393. return err
  9394. }
  9395. m.Value = &Response_EndBlock{v}
  9396. iNdEx = postIndex
  9397. case 11:
  9398. if wireType != 2 {
  9399. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9400. }
  9401. var msglen int
  9402. for shift := uint(0); ; shift += 7 {
  9403. if shift >= 64 {
  9404. return ErrIntOverflowTypes
  9405. }
  9406. if iNdEx >= l {
  9407. return io.ErrUnexpectedEOF
  9408. }
  9409. b := dAtA[iNdEx]
  9410. iNdEx++
  9411. msglen |= int(b&0x7F) << shift
  9412. if b < 0x80 {
  9413. break
  9414. }
  9415. }
  9416. if msglen < 0 {
  9417. return ErrInvalidLengthTypes
  9418. }
  9419. postIndex := iNdEx + msglen
  9420. if postIndex < 0 {
  9421. return ErrInvalidLengthTypes
  9422. }
  9423. if postIndex > l {
  9424. return io.ErrUnexpectedEOF
  9425. }
  9426. v := &ResponseCommit{}
  9427. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9428. return err
  9429. }
  9430. m.Value = &Response_Commit{v}
  9431. iNdEx = postIndex
  9432. case 12:
  9433. if wireType != 2 {
  9434. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9435. }
  9436. var msglen int
  9437. for shift := uint(0); ; shift += 7 {
  9438. if shift >= 64 {
  9439. return ErrIntOverflowTypes
  9440. }
  9441. if iNdEx >= l {
  9442. return io.ErrUnexpectedEOF
  9443. }
  9444. b := dAtA[iNdEx]
  9445. iNdEx++
  9446. msglen |= int(b&0x7F) << shift
  9447. if b < 0x80 {
  9448. break
  9449. }
  9450. }
  9451. if msglen < 0 {
  9452. return ErrInvalidLengthTypes
  9453. }
  9454. postIndex := iNdEx + msglen
  9455. if postIndex < 0 {
  9456. return ErrInvalidLengthTypes
  9457. }
  9458. if postIndex > l {
  9459. return io.ErrUnexpectedEOF
  9460. }
  9461. v := &ResponseListSnapshots{}
  9462. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9463. return err
  9464. }
  9465. m.Value = &Response_ListSnapshots{v}
  9466. iNdEx = postIndex
  9467. case 13:
  9468. if wireType != 2 {
  9469. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9470. }
  9471. var msglen int
  9472. for shift := uint(0); ; shift += 7 {
  9473. if shift >= 64 {
  9474. return ErrIntOverflowTypes
  9475. }
  9476. if iNdEx >= l {
  9477. return io.ErrUnexpectedEOF
  9478. }
  9479. b := dAtA[iNdEx]
  9480. iNdEx++
  9481. msglen |= int(b&0x7F) << shift
  9482. if b < 0x80 {
  9483. break
  9484. }
  9485. }
  9486. if msglen < 0 {
  9487. return ErrInvalidLengthTypes
  9488. }
  9489. postIndex := iNdEx + msglen
  9490. if postIndex < 0 {
  9491. return ErrInvalidLengthTypes
  9492. }
  9493. if postIndex > l {
  9494. return io.ErrUnexpectedEOF
  9495. }
  9496. v := &ResponseOfferSnapshot{}
  9497. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9498. return err
  9499. }
  9500. m.Value = &Response_OfferSnapshot{v}
  9501. iNdEx = postIndex
  9502. case 14:
  9503. if wireType != 2 {
  9504. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9505. }
  9506. var msglen int
  9507. for shift := uint(0); ; shift += 7 {
  9508. if shift >= 64 {
  9509. return ErrIntOverflowTypes
  9510. }
  9511. if iNdEx >= l {
  9512. return io.ErrUnexpectedEOF
  9513. }
  9514. b := dAtA[iNdEx]
  9515. iNdEx++
  9516. msglen |= int(b&0x7F) << shift
  9517. if b < 0x80 {
  9518. break
  9519. }
  9520. }
  9521. if msglen < 0 {
  9522. return ErrInvalidLengthTypes
  9523. }
  9524. postIndex := iNdEx + msglen
  9525. if postIndex < 0 {
  9526. return ErrInvalidLengthTypes
  9527. }
  9528. if postIndex > l {
  9529. return io.ErrUnexpectedEOF
  9530. }
  9531. v := &ResponseLoadSnapshotChunk{}
  9532. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9533. return err
  9534. }
  9535. m.Value = &Response_LoadSnapshotChunk{v}
  9536. iNdEx = postIndex
  9537. case 15:
  9538. if wireType != 2 {
  9539. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9540. }
  9541. var msglen int
  9542. for shift := uint(0); ; shift += 7 {
  9543. if shift >= 64 {
  9544. return ErrIntOverflowTypes
  9545. }
  9546. if iNdEx >= l {
  9547. return io.ErrUnexpectedEOF
  9548. }
  9549. b := dAtA[iNdEx]
  9550. iNdEx++
  9551. msglen |= int(b&0x7F) << shift
  9552. if b < 0x80 {
  9553. break
  9554. }
  9555. }
  9556. if msglen < 0 {
  9557. return ErrInvalidLengthTypes
  9558. }
  9559. postIndex := iNdEx + msglen
  9560. if postIndex < 0 {
  9561. return ErrInvalidLengthTypes
  9562. }
  9563. if postIndex > l {
  9564. return io.ErrUnexpectedEOF
  9565. }
  9566. v := &ResponseApplySnapshotChunk{}
  9567. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9568. return err
  9569. }
  9570. m.Value = &Response_ApplySnapshotChunk{v}
  9571. iNdEx = postIndex
  9572. default:
  9573. iNdEx = preIndex
  9574. skippy, err := skipTypes(dAtA[iNdEx:])
  9575. if err != nil {
  9576. return err
  9577. }
  9578. if skippy < 0 {
  9579. return ErrInvalidLengthTypes
  9580. }
  9581. if (iNdEx + skippy) < 0 {
  9582. return ErrInvalidLengthTypes
  9583. }
  9584. if (iNdEx + skippy) > l {
  9585. return io.ErrUnexpectedEOF
  9586. }
  9587. iNdEx += skippy
  9588. }
  9589. }
  9590. if iNdEx > l {
  9591. return io.ErrUnexpectedEOF
  9592. }
  9593. return nil
  9594. }
  9595. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9596. l := len(dAtA)
  9597. iNdEx := 0
  9598. for iNdEx < l {
  9599. preIndex := iNdEx
  9600. var wire uint64
  9601. for shift := uint(0); ; shift += 7 {
  9602. if shift >= 64 {
  9603. return ErrIntOverflowTypes
  9604. }
  9605. if iNdEx >= l {
  9606. return io.ErrUnexpectedEOF
  9607. }
  9608. b := dAtA[iNdEx]
  9609. iNdEx++
  9610. wire |= uint64(b&0x7F) << shift
  9611. if b < 0x80 {
  9612. break
  9613. }
  9614. }
  9615. fieldNum := int32(wire >> 3)
  9616. wireType := int(wire & 0x7)
  9617. if wireType == 4 {
  9618. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9619. }
  9620. if fieldNum <= 0 {
  9621. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9622. }
  9623. switch fieldNum {
  9624. case 1:
  9625. if wireType != 2 {
  9626. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9627. }
  9628. var stringLen uint64
  9629. for shift := uint(0); ; shift += 7 {
  9630. if shift >= 64 {
  9631. return ErrIntOverflowTypes
  9632. }
  9633. if iNdEx >= l {
  9634. return io.ErrUnexpectedEOF
  9635. }
  9636. b := dAtA[iNdEx]
  9637. iNdEx++
  9638. stringLen |= uint64(b&0x7F) << shift
  9639. if b < 0x80 {
  9640. break
  9641. }
  9642. }
  9643. intStringLen := int(stringLen)
  9644. if intStringLen < 0 {
  9645. return ErrInvalidLengthTypes
  9646. }
  9647. postIndex := iNdEx + intStringLen
  9648. if postIndex < 0 {
  9649. return ErrInvalidLengthTypes
  9650. }
  9651. if postIndex > l {
  9652. return io.ErrUnexpectedEOF
  9653. }
  9654. m.Error = string(dAtA[iNdEx:postIndex])
  9655. iNdEx = postIndex
  9656. default:
  9657. iNdEx = preIndex
  9658. skippy, err := skipTypes(dAtA[iNdEx:])
  9659. if err != nil {
  9660. return err
  9661. }
  9662. if skippy < 0 {
  9663. return ErrInvalidLengthTypes
  9664. }
  9665. if (iNdEx + skippy) < 0 {
  9666. return ErrInvalidLengthTypes
  9667. }
  9668. if (iNdEx + skippy) > l {
  9669. return io.ErrUnexpectedEOF
  9670. }
  9671. iNdEx += skippy
  9672. }
  9673. }
  9674. if iNdEx > l {
  9675. return io.ErrUnexpectedEOF
  9676. }
  9677. return nil
  9678. }
  9679. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9680. l := len(dAtA)
  9681. iNdEx := 0
  9682. for iNdEx < l {
  9683. preIndex := iNdEx
  9684. var wire uint64
  9685. for shift := uint(0); ; shift += 7 {
  9686. if shift >= 64 {
  9687. return ErrIntOverflowTypes
  9688. }
  9689. if iNdEx >= l {
  9690. return io.ErrUnexpectedEOF
  9691. }
  9692. b := dAtA[iNdEx]
  9693. iNdEx++
  9694. wire |= uint64(b&0x7F) << shift
  9695. if b < 0x80 {
  9696. break
  9697. }
  9698. }
  9699. fieldNum := int32(wire >> 3)
  9700. wireType := int(wire & 0x7)
  9701. if wireType == 4 {
  9702. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9703. }
  9704. if fieldNum <= 0 {
  9705. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9706. }
  9707. switch fieldNum {
  9708. case 1:
  9709. if wireType != 2 {
  9710. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9711. }
  9712. var stringLen uint64
  9713. for shift := uint(0); ; shift += 7 {
  9714. if shift >= 64 {
  9715. return ErrIntOverflowTypes
  9716. }
  9717. if iNdEx >= l {
  9718. return io.ErrUnexpectedEOF
  9719. }
  9720. b := dAtA[iNdEx]
  9721. iNdEx++
  9722. stringLen |= uint64(b&0x7F) << shift
  9723. if b < 0x80 {
  9724. break
  9725. }
  9726. }
  9727. intStringLen := int(stringLen)
  9728. if intStringLen < 0 {
  9729. return ErrInvalidLengthTypes
  9730. }
  9731. postIndex := iNdEx + intStringLen
  9732. if postIndex < 0 {
  9733. return ErrInvalidLengthTypes
  9734. }
  9735. if postIndex > l {
  9736. return io.ErrUnexpectedEOF
  9737. }
  9738. m.Message = string(dAtA[iNdEx:postIndex])
  9739. iNdEx = postIndex
  9740. default:
  9741. iNdEx = preIndex
  9742. skippy, err := skipTypes(dAtA[iNdEx:])
  9743. if err != nil {
  9744. return err
  9745. }
  9746. if skippy < 0 {
  9747. return ErrInvalidLengthTypes
  9748. }
  9749. if (iNdEx + skippy) < 0 {
  9750. return ErrInvalidLengthTypes
  9751. }
  9752. if (iNdEx + skippy) > l {
  9753. return io.ErrUnexpectedEOF
  9754. }
  9755. iNdEx += skippy
  9756. }
  9757. }
  9758. if iNdEx > l {
  9759. return io.ErrUnexpectedEOF
  9760. }
  9761. return nil
  9762. }
  9763. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9764. l := len(dAtA)
  9765. iNdEx := 0
  9766. for iNdEx < l {
  9767. preIndex := iNdEx
  9768. var wire uint64
  9769. for shift := uint(0); ; shift += 7 {
  9770. if shift >= 64 {
  9771. return ErrIntOverflowTypes
  9772. }
  9773. if iNdEx >= l {
  9774. return io.ErrUnexpectedEOF
  9775. }
  9776. b := dAtA[iNdEx]
  9777. iNdEx++
  9778. wire |= uint64(b&0x7F) << shift
  9779. if b < 0x80 {
  9780. break
  9781. }
  9782. }
  9783. fieldNum := int32(wire >> 3)
  9784. wireType := int(wire & 0x7)
  9785. if wireType == 4 {
  9786. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9787. }
  9788. if fieldNum <= 0 {
  9789. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9790. }
  9791. switch fieldNum {
  9792. default:
  9793. iNdEx = preIndex
  9794. skippy, err := skipTypes(dAtA[iNdEx:])
  9795. if err != nil {
  9796. return err
  9797. }
  9798. if skippy < 0 {
  9799. return ErrInvalidLengthTypes
  9800. }
  9801. if (iNdEx + skippy) < 0 {
  9802. return ErrInvalidLengthTypes
  9803. }
  9804. if (iNdEx + skippy) > l {
  9805. return io.ErrUnexpectedEOF
  9806. }
  9807. iNdEx += skippy
  9808. }
  9809. }
  9810. if iNdEx > l {
  9811. return io.ErrUnexpectedEOF
  9812. }
  9813. return nil
  9814. }
  9815. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  9816. l := len(dAtA)
  9817. iNdEx := 0
  9818. for iNdEx < l {
  9819. preIndex := iNdEx
  9820. var wire uint64
  9821. for shift := uint(0); ; shift += 7 {
  9822. if shift >= 64 {
  9823. return ErrIntOverflowTypes
  9824. }
  9825. if iNdEx >= l {
  9826. return io.ErrUnexpectedEOF
  9827. }
  9828. b := dAtA[iNdEx]
  9829. iNdEx++
  9830. wire |= uint64(b&0x7F) << shift
  9831. if b < 0x80 {
  9832. break
  9833. }
  9834. }
  9835. fieldNum := int32(wire >> 3)
  9836. wireType := int(wire & 0x7)
  9837. if wireType == 4 {
  9838. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  9839. }
  9840. if fieldNum <= 0 {
  9841. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9842. }
  9843. switch fieldNum {
  9844. case 1:
  9845. if wireType != 2 {
  9846. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9847. }
  9848. var stringLen uint64
  9849. for shift := uint(0); ; shift += 7 {
  9850. if shift >= 64 {
  9851. return ErrIntOverflowTypes
  9852. }
  9853. if iNdEx >= l {
  9854. return io.ErrUnexpectedEOF
  9855. }
  9856. b := dAtA[iNdEx]
  9857. iNdEx++
  9858. stringLen |= uint64(b&0x7F) << shift
  9859. if b < 0x80 {
  9860. break
  9861. }
  9862. }
  9863. intStringLen := int(stringLen)
  9864. if intStringLen < 0 {
  9865. return ErrInvalidLengthTypes
  9866. }
  9867. postIndex := iNdEx + intStringLen
  9868. if postIndex < 0 {
  9869. return ErrInvalidLengthTypes
  9870. }
  9871. if postIndex > l {
  9872. return io.ErrUnexpectedEOF
  9873. }
  9874. m.Data = string(dAtA[iNdEx:postIndex])
  9875. iNdEx = postIndex
  9876. case 2:
  9877. if wireType != 2 {
  9878. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9879. }
  9880. var stringLen uint64
  9881. for shift := uint(0); ; shift += 7 {
  9882. if shift >= 64 {
  9883. return ErrIntOverflowTypes
  9884. }
  9885. if iNdEx >= l {
  9886. return io.ErrUnexpectedEOF
  9887. }
  9888. b := dAtA[iNdEx]
  9889. iNdEx++
  9890. stringLen |= uint64(b&0x7F) << shift
  9891. if b < 0x80 {
  9892. break
  9893. }
  9894. }
  9895. intStringLen := int(stringLen)
  9896. if intStringLen < 0 {
  9897. return ErrInvalidLengthTypes
  9898. }
  9899. postIndex := iNdEx + intStringLen
  9900. if postIndex < 0 {
  9901. return ErrInvalidLengthTypes
  9902. }
  9903. if postIndex > l {
  9904. return io.ErrUnexpectedEOF
  9905. }
  9906. m.Version = string(dAtA[iNdEx:postIndex])
  9907. iNdEx = postIndex
  9908. case 3:
  9909. if wireType != 0 {
  9910. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9911. }
  9912. m.AppVersion = 0
  9913. for shift := uint(0); ; shift += 7 {
  9914. if shift >= 64 {
  9915. return ErrIntOverflowTypes
  9916. }
  9917. if iNdEx >= l {
  9918. return io.ErrUnexpectedEOF
  9919. }
  9920. b := dAtA[iNdEx]
  9921. iNdEx++
  9922. m.AppVersion |= uint64(b&0x7F) << shift
  9923. if b < 0x80 {
  9924. break
  9925. }
  9926. }
  9927. case 4:
  9928. if wireType != 0 {
  9929. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9930. }
  9931. m.LastBlockHeight = 0
  9932. for shift := uint(0); ; shift += 7 {
  9933. if shift >= 64 {
  9934. return ErrIntOverflowTypes
  9935. }
  9936. if iNdEx >= l {
  9937. return io.ErrUnexpectedEOF
  9938. }
  9939. b := dAtA[iNdEx]
  9940. iNdEx++
  9941. m.LastBlockHeight |= int64(b&0x7F) << shift
  9942. if b < 0x80 {
  9943. break
  9944. }
  9945. }
  9946. case 5:
  9947. if wireType != 2 {
  9948. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9949. }
  9950. var byteLen int
  9951. for shift := uint(0); ; shift += 7 {
  9952. if shift >= 64 {
  9953. return ErrIntOverflowTypes
  9954. }
  9955. if iNdEx >= l {
  9956. return io.ErrUnexpectedEOF
  9957. }
  9958. b := dAtA[iNdEx]
  9959. iNdEx++
  9960. byteLen |= int(b&0x7F) << shift
  9961. if b < 0x80 {
  9962. break
  9963. }
  9964. }
  9965. if byteLen < 0 {
  9966. return ErrInvalidLengthTypes
  9967. }
  9968. postIndex := iNdEx + byteLen
  9969. if postIndex < 0 {
  9970. return ErrInvalidLengthTypes
  9971. }
  9972. if postIndex > l {
  9973. return io.ErrUnexpectedEOF
  9974. }
  9975. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9976. if m.LastBlockAppHash == nil {
  9977. m.LastBlockAppHash = []byte{}
  9978. }
  9979. iNdEx = postIndex
  9980. default:
  9981. iNdEx = preIndex
  9982. skippy, err := skipTypes(dAtA[iNdEx:])
  9983. if err != nil {
  9984. return err
  9985. }
  9986. if skippy < 0 {
  9987. return ErrInvalidLengthTypes
  9988. }
  9989. if (iNdEx + skippy) < 0 {
  9990. return ErrInvalidLengthTypes
  9991. }
  9992. if (iNdEx + skippy) > l {
  9993. return io.ErrUnexpectedEOF
  9994. }
  9995. iNdEx += skippy
  9996. }
  9997. }
  9998. if iNdEx > l {
  9999. return io.ErrUnexpectedEOF
  10000. }
  10001. return nil
  10002. }
  10003. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  10004. l := len(dAtA)
  10005. iNdEx := 0
  10006. for iNdEx < l {
  10007. preIndex := iNdEx
  10008. var wire uint64
  10009. for shift := uint(0); ; shift += 7 {
  10010. if shift >= 64 {
  10011. return ErrIntOverflowTypes
  10012. }
  10013. if iNdEx >= l {
  10014. return io.ErrUnexpectedEOF
  10015. }
  10016. b := dAtA[iNdEx]
  10017. iNdEx++
  10018. wire |= uint64(b&0x7F) << shift
  10019. if b < 0x80 {
  10020. break
  10021. }
  10022. }
  10023. fieldNum := int32(wire >> 3)
  10024. wireType := int(wire & 0x7)
  10025. if wireType == 4 {
  10026. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  10027. }
  10028. if fieldNum <= 0 {
  10029. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  10030. }
  10031. switch fieldNum {
  10032. case 1:
  10033. if wireType != 2 {
  10034. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  10035. }
  10036. var msglen int
  10037. for shift := uint(0); ; shift += 7 {
  10038. if shift >= 64 {
  10039. return ErrIntOverflowTypes
  10040. }
  10041. if iNdEx >= l {
  10042. return io.ErrUnexpectedEOF
  10043. }
  10044. b := dAtA[iNdEx]
  10045. iNdEx++
  10046. msglen |= int(b&0x7F) << shift
  10047. if b < 0x80 {
  10048. break
  10049. }
  10050. }
  10051. if msglen < 0 {
  10052. return ErrInvalidLengthTypes
  10053. }
  10054. postIndex := iNdEx + msglen
  10055. if postIndex < 0 {
  10056. return ErrInvalidLengthTypes
  10057. }
  10058. if postIndex > l {
  10059. return io.ErrUnexpectedEOF
  10060. }
  10061. if m.ConsensusParams == nil {
  10062. m.ConsensusParams = &ConsensusParams{}
  10063. }
  10064. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10065. return err
  10066. }
  10067. iNdEx = postIndex
  10068. case 2:
  10069. if wireType != 2 {
  10070. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  10071. }
  10072. var msglen int
  10073. for shift := uint(0); ; shift += 7 {
  10074. if shift >= 64 {
  10075. return ErrIntOverflowTypes
  10076. }
  10077. if iNdEx >= l {
  10078. return io.ErrUnexpectedEOF
  10079. }
  10080. b := dAtA[iNdEx]
  10081. iNdEx++
  10082. msglen |= int(b&0x7F) << shift
  10083. if b < 0x80 {
  10084. break
  10085. }
  10086. }
  10087. if msglen < 0 {
  10088. return ErrInvalidLengthTypes
  10089. }
  10090. postIndex := iNdEx + msglen
  10091. if postIndex < 0 {
  10092. return ErrInvalidLengthTypes
  10093. }
  10094. if postIndex > l {
  10095. return io.ErrUnexpectedEOF
  10096. }
  10097. m.Validators = append(m.Validators, ValidatorUpdate{})
  10098. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10099. return err
  10100. }
  10101. iNdEx = postIndex
  10102. case 3:
  10103. if wireType != 2 {
  10104. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  10105. }
  10106. var byteLen int
  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. byteLen |= int(b&0x7F) << shift
  10117. if b < 0x80 {
  10118. break
  10119. }
  10120. }
  10121. if byteLen < 0 {
  10122. return ErrInvalidLengthTypes
  10123. }
  10124. postIndex := iNdEx + byteLen
  10125. if postIndex < 0 {
  10126. return ErrInvalidLengthTypes
  10127. }
  10128. if postIndex > l {
  10129. return io.ErrUnexpectedEOF
  10130. }
  10131. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  10132. if m.AppHash == nil {
  10133. m.AppHash = []byte{}
  10134. }
  10135. iNdEx = postIndex
  10136. default:
  10137. iNdEx = preIndex
  10138. skippy, err := skipTypes(dAtA[iNdEx:])
  10139. if err != nil {
  10140. return err
  10141. }
  10142. if skippy < 0 {
  10143. return ErrInvalidLengthTypes
  10144. }
  10145. if (iNdEx + skippy) < 0 {
  10146. return ErrInvalidLengthTypes
  10147. }
  10148. if (iNdEx + skippy) > l {
  10149. return io.ErrUnexpectedEOF
  10150. }
  10151. iNdEx += skippy
  10152. }
  10153. }
  10154. if iNdEx > l {
  10155. return io.ErrUnexpectedEOF
  10156. }
  10157. return nil
  10158. }
  10159. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  10160. l := len(dAtA)
  10161. iNdEx := 0
  10162. for iNdEx < l {
  10163. preIndex := iNdEx
  10164. var wire uint64
  10165. for shift := uint(0); ; shift += 7 {
  10166. if shift >= 64 {
  10167. return ErrIntOverflowTypes
  10168. }
  10169. if iNdEx >= l {
  10170. return io.ErrUnexpectedEOF
  10171. }
  10172. b := dAtA[iNdEx]
  10173. iNdEx++
  10174. wire |= uint64(b&0x7F) << shift
  10175. if b < 0x80 {
  10176. break
  10177. }
  10178. }
  10179. fieldNum := int32(wire >> 3)
  10180. wireType := int(wire & 0x7)
  10181. if wireType == 4 {
  10182. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  10183. }
  10184. if fieldNum <= 0 {
  10185. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  10186. }
  10187. switch fieldNum {
  10188. case 1:
  10189. if wireType != 0 {
  10190. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10191. }
  10192. m.Code = 0
  10193. for shift := uint(0); ; shift += 7 {
  10194. if shift >= 64 {
  10195. return ErrIntOverflowTypes
  10196. }
  10197. if iNdEx >= l {
  10198. return io.ErrUnexpectedEOF
  10199. }
  10200. b := dAtA[iNdEx]
  10201. iNdEx++
  10202. m.Code |= uint32(b&0x7F) << shift
  10203. if b < 0x80 {
  10204. break
  10205. }
  10206. }
  10207. case 3:
  10208. if wireType != 2 {
  10209. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10210. }
  10211. var stringLen uint64
  10212. for shift := uint(0); ; shift += 7 {
  10213. if shift >= 64 {
  10214. return ErrIntOverflowTypes
  10215. }
  10216. if iNdEx >= l {
  10217. return io.ErrUnexpectedEOF
  10218. }
  10219. b := dAtA[iNdEx]
  10220. iNdEx++
  10221. stringLen |= uint64(b&0x7F) << shift
  10222. if b < 0x80 {
  10223. break
  10224. }
  10225. }
  10226. intStringLen := int(stringLen)
  10227. if intStringLen < 0 {
  10228. return ErrInvalidLengthTypes
  10229. }
  10230. postIndex := iNdEx + intStringLen
  10231. if postIndex < 0 {
  10232. return ErrInvalidLengthTypes
  10233. }
  10234. if postIndex > l {
  10235. return io.ErrUnexpectedEOF
  10236. }
  10237. m.Log = string(dAtA[iNdEx:postIndex])
  10238. iNdEx = postIndex
  10239. case 4:
  10240. if wireType != 2 {
  10241. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10242. }
  10243. var stringLen uint64
  10244. for shift := uint(0); ; shift += 7 {
  10245. if shift >= 64 {
  10246. return ErrIntOverflowTypes
  10247. }
  10248. if iNdEx >= l {
  10249. return io.ErrUnexpectedEOF
  10250. }
  10251. b := dAtA[iNdEx]
  10252. iNdEx++
  10253. stringLen |= uint64(b&0x7F) << shift
  10254. if b < 0x80 {
  10255. break
  10256. }
  10257. }
  10258. intStringLen := int(stringLen)
  10259. if intStringLen < 0 {
  10260. return ErrInvalidLengthTypes
  10261. }
  10262. postIndex := iNdEx + intStringLen
  10263. if postIndex < 0 {
  10264. return ErrInvalidLengthTypes
  10265. }
  10266. if postIndex > l {
  10267. return io.ErrUnexpectedEOF
  10268. }
  10269. m.Info = string(dAtA[iNdEx:postIndex])
  10270. iNdEx = postIndex
  10271. case 5:
  10272. if wireType != 0 {
  10273. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10274. }
  10275. m.Index = 0
  10276. for shift := uint(0); ; shift += 7 {
  10277. if shift >= 64 {
  10278. return ErrIntOverflowTypes
  10279. }
  10280. if iNdEx >= l {
  10281. return io.ErrUnexpectedEOF
  10282. }
  10283. b := dAtA[iNdEx]
  10284. iNdEx++
  10285. m.Index |= int64(b&0x7F) << shift
  10286. if b < 0x80 {
  10287. break
  10288. }
  10289. }
  10290. case 6:
  10291. if wireType != 2 {
  10292. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10293. }
  10294. var byteLen int
  10295. for shift := uint(0); ; shift += 7 {
  10296. if shift >= 64 {
  10297. return ErrIntOverflowTypes
  10298. }
  10299. if iNdEx >= l {
  10300. return io.ErrUnexpectedEOF
  10301. }
  10302. b := dAtA[iNdEx]
  10303. iNdEx++
  10304. byteLen |= int(b&0x7F) << shift
  10305. if b < 0x80 {
  10306. break
  10307. }
  10308. }
  10309. if byteLen < 0 {
  10310. return ErrInvalidLengthTypes
  10311. }
  10312. postIndex := iNdEx + byteLen
  10313. if postIndex < 0 {
  10314. return ErrInvalidLengthTypes
  10315. }
  10316. if postIndex > l {
  10317. return io.ErrUnexpectedEOF
  10318. }
  10319. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10320. if m.Key == nil {
  10321. m.Key = []byte{}
  10322. }
  10323. iNdEx = postIndex
  10324. case 7:
  10325. if wireType != 2 {
  10326. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10327. }
  10328. var byteLen int
  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. byteLen |= int(b&0x7F) << shift
  10339. if b < 0x80 {
  10340. break
  10341. }
  10342. }
  10343. if byteLen < 0 {
  10344. return ErrInvalidLengthTypes
  10345. }
  10346. postIndex := iNdEx + byteLen
  10347. if postIndex < 0 {
  10348. return ErrInvalidLengthTypes
  10349. }
  10350. if postIndex > l {
  10351. return io.ErrUnexpectedEOF
  10352. }
  10353. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10354. if m.Value == nil {
  10355. m.Value = []byte{}
  10356. }
  10357. iNdEx = postIndex
  10358. case 8:
  10359. if wireType != 2 {
  10360. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10361. }
  10362. var msglen int
  10363. for shift := uint(0); ; shift += 7 {
  10364. if shift >= 64 {
  10365. return ErrIntOverflowTypes
  10366. }
  10367. if iNdEx >= l {
  10368. return io.ErrUnexpectedEOF
  10369. }
  10370. b := dAtA[iNdEx]
  10371. iNdEx++
  10372. msglen |= int(b&0x7F) << shift
  10373. if b < 0x80 {
  10374. break
  10375. }
  10376. }
  10377. if msglen < 0 {
  10378. return ErrInvalidLengthTypes
  10379. }
  10380. postIndex := iNdEx + msglen
  10381. if postIndex < 0 {
  10382. return ErrInvalidLengthTypes
  10383. }
  10384. if postIndex > l {
  10385. return io.ErrUnexpectedEOF
  10386. }
  10387. if m.ProofOps == nil {
  10388. m.ProofOps = &crypto.ProofOps{}
  10389. }
  10390. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10391. return err
  10392. }
  10393. iNdEx = postIndex
  10394. case 9:
  10395. if wireType != 0 {
  10396. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10397. }
  10398. m.Height = 0
  10399. for shift := uint(0); ; shift += 7 {
  10400. if shift >= 64 {
  10401. return ErrIntOverflowTypes
  10402. }
  10403. if iNdEx >= l {
  10404. return io.ErrUnexpectedEOF
  10405. }
  10406. b := dAtA[iNdEx]
  10407. iNdEx++
  10408. m.Height |= int64(b&0x7F) << shift
  10409. if b < 0x80 {
  10410. break
  10411. }
  10412. }
  10413. case 10:
  10414. if wireType != 2 {
  10415. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10416. }
  10417. var stringLen uint64
  10418. for shift := uint(0); ; shift += 7 {
  10419. if shift >= 64 {
  10420. return ErrIntOverflowTypes
  10421. }
  10422. if iNdEx >= l {
  10423. return io.ErrUnexpectedEOF
  10424. }
  10425. b := dAtA[iNdEx]
  10426. iNdEx++
  10427. stringLen |= uint64(b&0x7F) << shift
  10428. if b < 0x80 {
  10429. break
  10430. }
  10431. }
  10432. intStringLen := int(stringLen)
  10433. if intStringLen < 0 {
  10434. return ErrInvalidLengthTypes
  10435. }
  10436. postIndex := iNdEx + intStringLen
  10437. if postIndex < 0 {
  10438. return ErrInvalidLengthTypes
  10439. }
  10440. if postIndex > l {
  10441. return io.ErrUnexpectedEOF
  10442. }
  10443. m.Codespace = string(dAtA[iNdEx:postIndex])
  10444. iNdEx = postIndex
  10445. default:
  10446. iNdEx = preIndex
  10447. skippy, err := skipTypes(dAtA[iNdEx:])
  10448. if err != nil {
  10449. return err
  10450. }
  10451. if skippy < 0 {
  10452. return ErrInvalidLengthTypes
  10453. }
  10454. if (iNdEx + skippy) < 0 {
  10455. return ErrInvalidLengthTypes
  10456. }
  10457. if (iNdEx + skippy) > l {
  10458. return io.ErrUnexpectedEOF
  10459. }
  10460. iNdEx += skippy
  10461. }
  10462. }
  10463. if iNdEx > l {
  10464. return io.ErrUnexpectedEOF
  10465. }
  10466. return nil
  10467. }
  10468. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10469. l := len(dAtA)
  10470. iNdEx := 0
  10471. for iNdEx < l {
  10472. preIndex := iNdEx
  10473. var wire uint64
  10474. for shift := uint(0); ; shift += 7 {
  10475. if shift >= 64 {
  10476. return ErrIntOverflowTypes
  10477. }
  10478. if iNdEx >= l {
  10479. return io.ErrUnexpectedEOF
  10480. }
  10481. b := dAtA[iNdEx]
  10482. iNdEx++
  10483. wire |= uint64(b&0x7F) << shift
  10484. if b < 0x80 {
  10485. break
  10486. }
  10487. }
  10488. fieldNum := int32(wire >> 3)
  10489. wireType := int(wire & 0x7)
  10490. if wireType == 4 {
  10491. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10492. }
  10493. if fieldNum <= 0 {
  10494. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10495. }
  10496. switch fieldNum {
  10497. case 1:
  10498. if wireType != 2 {
  10499. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10500. }
  10501. var msglen int
  10502. for shift := uint(0); ; shift += 7 {
  10503. if shift >= 64 {
  10504. return ErrIntOverflowTypes
  10505. }
  10506. if iNdEx >= l {
  10507. return io.ErrUnexpectedEOF
  10508. }
  10509. b := dAtA[iNdEx]
  10510. iNdEx++
  10511. msglen |= int(b&0x7F) << shift
  10512. if b < 0x80 {
  10513. break
  10514. }
  10515. }
  10516. if msglen < 0 {
  10517. return ErrInvalidLengthTypes
  10518. }
  10519. postIndex := iNdEx + msglen
  10520. if postIndex < 0 {
  10521. return ErrInvalidLengthTypes
  10522. }
  10523. if postIndex > l {
  10524. return io.ErrUnexpectedEOF
  10525. }
  10526. m.Events = append(m.Events, Event{})
  10527. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10528. return err
  10529. }
  10530. iNdEx = postIndex
  10531. default:
  10532. iNdEx = preIndex
  10533. skippy, err := skipTypes(dAtA[iNdEx:])
  10534. if err != nil {
  10535. return err
  10536. }
  10537. if skippy < 0 {
  10538. return ErrInvalidLengthTypes
  10539. }
  10540. if (iNdEx + skippy) < 0 {
  10541. return ErrInvalidLengthTypes
  10542. }
  10543. if (iNdEx + skippy) > l {
  10544. return io.ErrUnexpectedEOF
  10545. }
  10546. iNdEx += skippy
  10547. }
  10548. }
  10549. if iNdEx > l {
  10550. return io.ErrUnexpectedEOF
  10551. }
  10552. return nil
  10553. }
  10554. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10555. l := len(dAtA)
  10556. iNdEx := 0
  10557. for iNdEx < l {
  10558. preIndex := iNdEx
  10559. var wire uint64
  10560. for shift := uint(0); ; shift += 7 {
  10561. if shift >= 64 {
  10562. return ErrIntOverflowTypes
  10563. }
  10564. if iNdEx >= l {
  10565. return io.ErrUnexpectedEOF
  10566. }
  10567. b := dAtA[iNdEx]
  10568. iNdEx++
  10569. wire |= uint64(b&0x7F) << shift
  10570. if b < 0x80 {
  10571. break
  10572. }
  10573. }
  10574. fieldNum := int32(wire >> 3)
  10575. wireType := int(wire & 0x7)
  10576. if wireType == 4 {
  10577. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10578. }
  10579. if fieldNum <= 0 {
  10580. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10581. }
  10582. switch fieldNum {
  10583. case 1:
  10584. if wireType != 0 {
  10585. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10586. }
  10587. m.Code = 0
  10588. for shift := uint(0); ; shift += 7 {
  10589. if shift >= 64 {
  10590. return ErrIntOverflowTypes
  10591. }
  10592. if iNdEx >= l {
  10593. return io.ErrUnexpectedEOF
  10594. }
  10595. b := dAtA[iNdEx]
  10596. iNdEx++
  10597. m.Code |= uint32(b&0x7F) << shift
  10598. if b < 0x80 {
  10599. break
  10600. }
  10601. }
  10602. case 2:
  10603. if wireType != 2 {
  10604. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10605. }
  10606. var byteLen int
  10607. for shift := uint(0); ; shift += 7 {
  10608. if shift >= 64 {
  10609. return ErrIntOverflowTypes
  10610. }
  10611. if iNdEx >= l {
  10612. return io.ErrUnexpectedEOF
  10613. }
  10614. b := dAtA[iNdEx]
  10615. iNdEx++
  10616. byteLen |= int(b&0x7F) << shift
  10617. if b < 0x80 {
  10618. break
  10619. }
  10620. }
  10621. if byteLen < 0 {
  10622. return ErrInvalidLengthTypes
  10623. }
  10624. postIndex := iNdEx + byteLen
  10625. if postIndex < 0 {
  10626. return ErrInvalidLengthTypes
  10627. }
  10628. if postIndex > l {
  10629. return io.ErrUnexpectedEOF
  10630. }
  10631. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10632. if m.Data == nil {
  10633. m.Data = []byte{}
  10634. }
  10635. iNdEx = postIndex
  10636. case 3:
  10637. if wireType != 2 {
  10638. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10639. }
  10640. var stringLen uint64
  10641. for shift := uint(0); ; shift += 7 {
  10642. if shift >= 64 {
  10643. return ErrIntOverflowTypes
  10644. }
  10645. if iNdEx >= l {
  10646. return io.ErrUnexpectedEOF
  10647. }
  10648. b := dAtA[iNdEx]
  10649. iNdEx++
  10650. stringLen |= uint64(b&0x7F) << shift
  10651. if b < 0x80 {
  10652. break
  10653. }
  10654. }
  10655. intStringLen := int(stringLen)
  10656. if intStringLen < 0 {
  10657. return ErrInvalidLengthTypes
  10658. }
  10659. postIndex := iNdEx + intStringLen
  10660. if postIndex < 0 {
  10661. return ErrInvalidLengthTypes
  10662. }
  10663. if postIndex > l {
  10664. return io.ErrUnexpectedEOF
  10665. }
  10666. m.Log = string(dAtA[iNdEx:postIndex])
  10667. iNdEx = postIndex
  10668. case 4:
  10669. if wireType != 2 {
  10670. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10671. }
  10672. var stringLen uint64
  10673. for shift := uint(0); ; shift += 7 {
  10674. if shift >= 64 {
  10675. return ErrIntOverflowTypes
  10676. }
  10677. if iNdEx >= l {
  10678. return io.ErrUnexpectedEOF
  10679. }
  10680. b := dAtA[iNdEx]
  10681. iNdEx++
  10682. stringLen |= uint64(b&0x7F) << shift
  10683. if b < 0x80 {
  10684. break
  10685. }
  10686. }
  10687. intStringLen := int(stringLen)
  10688. if intStringLen < 0 {
  10689. return ErrInvalidLengthTypes
  10690. }
  10691. postIndex := iNdEx + intStringLen
  10692. if postIndex < 0 {
  10693. return ErrInvalidLengthTypes
  10694. }
  10695. if postIndex > l {
  10696. return io.ErrUnexpectedEOF
  10697. }
  10698. m.Info = string(dAtA[iNdEx:postIndex])
  10699. iNdEx = postIndex
  10700. case 5:
  10701. if wireType != 0 {
  10702. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10703. }
  10704. m.GasWanted = 0
  10705. for shift := uint(0); ; shift += 7 {
  10706. if shift >= 64 {
  10707. return ErrIntOverflowTypes
  10708. }
  10709. if iNdEx >= l {
  10710. return io.ErrUnexpectedEOF
  10711. }
  10712. b := dAtA[iNdEx]
  10713. iNdEx++
  10714. m.GasWanted |= int64(b&0x7F) << shift
  10715. if b < 0x80 {
  10716. break
  10717. }
  10718. }
  10719. case 6:
  10720. if wireType != 0 {
  10721. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10722. }
  10723. m.GasUsed = 0
  10724. for shift := uint(0); ; shift += 7 {
  10725. if shift >= 64 {
  10726. return ErrIntOverflowTypes
  10727. }
  10728. if iNdEx >= l {
  10729. return io.ErrUnexpectedEOF
  10730. }
  10731. b := dAtA[iNdEx]
  10732. iNdEx++
  10733. m.GasUsed |= int64(b&0x7F) << shift
  10734. if b < 0x80 {
  10735. break
  10736. }
  10737. }
  10738. case 7:
  10739. if wireType != 2 {
  10740. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10741. }
  10742. var msglen int
  10743. for shift := uint(0); ; shift += 7 {
  10744. if shift >= 64 {
  10745. return ErrIntOverflowTypes
  10746. }
  10747. if iNdEx >= l {
  10748. return io.ErrUnexpectedEOF
  10749. }
  10750. b := dAtA[iNdEx]
  10751. iNdEx++
  10752. msglen |= int(b&0x7F) << shift
  10753. if b < 0x80 {
  10754. break
  10755. }
  10756. }
  10757. if msglen < 0 {
  10758. return ErrInvalidLengthTypes
  10759. }
  10760. postIndex := iNdEx + msglen
  10761. if postIndex < 0 {
  10762. return ErrInvalidLengthTypes
  10763. }
  10764. if postIndex > l {
  10765. return io.ErrUnexpectedEOF
  10766. }
  10767. m.Events = append(m.Events, Event{})
  10768. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10769. return err
  10770. }
  10771. iNdEx = postIndex
  10772. case 8:
  10773. if wireType != 2 {
  10774. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10775. }
  10776. var stringLen uint64
  10777. for shift := uint(0); ; shift += 7 {
  10778. if shift >= 64 {
  10779. return ErrIntOverflowTypes
  10780. }
  10781. if iNdEx >= l {
  10782. return io.ErrUnexpectedEOF
  10783. }
  10784. b := dAtA[iNdEx]
  10785. iNdEx++
  10786. stringLen |= uint64(b&0x7F) << shift
  10787. if b < 0x80 {
  10788. break
  10789. }
  10790. }
  10791. intStringLen := int(stringLen)
  10792. if intStringLen < 0 {
  10793. return ErrInvalidLengthTypes
  10794. }
  10795. postIndex := iNdEx + intStringLen
  10796. if postIndex < 0 {
  10797. return ErrInvalidLengthTypes
  10798. }
  10799. if postIndex > l {
  10800. return io.ErrUnexpectedEOF
  10801. }
  10802. m.Codespace = string(dAtA[iNdEx:postIndex])
  10803. iNdEx = postIndex
  10804. default:
  10805. iNdEx = preIndex
  10806. skippy, err := skipTypes(dAtA[iNdEx:])
  10807. if err != nil {
  10808. return err
  10809. }
  10810. if skippy < 0 {
  10811. return ErrInvalidLengthTypes
  10812. }
  10813. if (iNdEx + skippy) < 0 {
  10814. return ErrInvalidLengthTypes
  10815. }
  10816. if (iNdEx + skippy) > l {
  10817. return io.ErrUnexpectedEOF
  10818. }
  10819. iNdEx += skippy
  10820. }
  10821. }
  10822. if iNdEx > l {
  10823. return io.ErrUnexpectedEOF
  10824. }
  10825. return nil
  10826. }
  10827. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10828. l := len(dAtA)
  10829. iNdEx := 0
  10830. for iNdEx < l {
  10831. preIndex := iNdEx
  10832. var wire uint64
  10833. for shift := uint(0); ; shift += 7 {
  10834. if shift >= 64 {
  10835. return ErrIntOverflowTypes
  10836. }
  10837. if iNdEx >= l {
  10838. return io.ErrUnexpectedEOF
  10839. }
  10840. b := dAtA[iNdEx]
  10841. iNdEx++
  10842. wire |= uint64(b&0x7F) << shift
  10843. if b < 0x80 {
  10844. break
  10845. }
  10846. }
  10847. fieldNum := int32(wire >> 3)
  10848. wireType := int(wire & 0x7)
  10849. if wireType == 4 {
  10850. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10851. }
  10852. if fieldNum <= 0 {
  10853. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10854. }
  10855. switch fieldNum {
  10856. case 1:
  10857. if wireType != 0 {
  10858. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10859. }
  10860. m.Code = 0
  10861. for shift := uint(0); ; shift += 7 {
  10862. if shift >= 64 {
  10863. return ErrIntOverflowTypes
  10864. }
  10865. if iNdEx >= l {
  10866. return io.ErrUnexpectedEOF
  10867. }
  10868. b := dAtA[iNdEx]
  10869. iNdEx++
  10870. m.Code |= uint32(b&0x7F) << shift
  10871. if b < 0x80 {
  10872. break
  10873. }
  10874. }
  10875. case 2:
  10876. if wireType != 2 {
  10877. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10878. }
  10879. var byteLen int
  10880. for shift := uint(0); ; shift += 7 {
  10881. if shift >= 64 {
  10882. return ErrIntOverflowTypes
  10883. }
  10884. if iNdEx >= l {
  10885. return io.ErrUnexpectedEOF
  10886. }
  10887. b := dAtA[iNdEx]
  10888. iNdEx++
  10889. byteLen |= int(b&0x7F) << shift
  10890. if b < 0x80 {
  10891. break
  10892. }
  10893. }
  10894. if byteLen < 0 {
  10895. return ErrInvalidLengthTypes
  10896. }
  10897. postIndex := iNdEx + byteLen
  10898. if postIndex < 0 {
  10899. return ErrInvalidLengthTypes
  10900. }
  10901. if postIndex > l {
  10902. return io.ErrUnexpectedEOF
  10903. }
  10904. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10905. if m.Data == nil {
  10906. m.Data = []byte{}
  10907. }
  10908. iNdEx = postIndex
  10909. case 3:
  10910. if wireType != 2 {
  10911. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10912. }
  10913. var stringLen uint64
  10914. for shift := uint(0); ; shift += 7 {
  10915. if shift >= 64 {
  10916. return ErrIntOverflowTypes
  10917. }
  10918. if iNdEx >= l {
  10919. return io.ErrUnexpectedEOF
  10920. }
  10921. b := dAtA[iNdEx]
  10922. iNdEx++
  10923. stringLen |= uint64(b&0x7F) << shift
  10924. if b < 0x80 {
  10925. break
  10926. }
  10927. }
  10928. intStringLen := int(stringLen)
  10929. if intStringLen < 0 {
  10930. return ErrInvalidLengthTypes
  10931. }
  10932. postIndex := iNdEx + intStringLen
  10933. if postIndex < 0 {
  10934. return ErrInvalidLengthTypes
  10935. }
  10936. if postIndex > l {
  10937. return io.ErrUnexpectedEOF
  10938. }
  10939. m.Log = string(dAtA[iNdEx:postIndex])
  10940. iNdEx = postIndex
  10941. case 4:
  10942. if wireType != 2 {
  10943. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10944. }
  10945. var stringLen uint64
  10946. for shift := uint(0); ; shift += 7 {
  10947. if shift >= 64 {
  10948. return ErrIntOverflowTypes
  10949. }
  10950. if iNdEx >= l {
  10951. return io.ErrUnexpectedEOF
  10952. }
  10953. b := dAtA[iNdEx]
  10954. iNdEx++
  10955. stringLen |= uint64(b&0x7F) << shift
  10956. if b < 0x80 {
  10957. break
  10958. }
  10959. }
  10960. intStringLen := int(stringLen)
  10961. if intStringLen < 0 {
  10962. return ErrInvalidLengthTypes
  10963. }
  10964. postIndex := iNdEx + intStringLen
  10965. if postIndex < 0 {
  10966. return ErrInvalidLengthTypes
  10967. }
  10968. if postIndex > l {
  10969. return io.ErrUnexpectedEOF
  10970. }
  10971. m.Info = string(dAtA[iNdEx:postIndex])
  10972. iNdEx = postIndex
  10973. case 5:
  10974. if wireType != 0 {
  10975. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10976. }
  10977. m.GasWanted = 0
  10978. for shift := uint(0); ; shift += 7 {
  10979. if shift >= 64 {
  10980. return ErrIntOverflowTypes
  10981. }
  10982. if iNdEx >= l {
  10983. return io.ErrUnexpectedEOF
  10984. }
  10985. b := dAtA[iNdEx]
  10986. iNdEx++
  10987. m.GasWanted |= int64(b&0x7F) << shift
  10988. if b < 0x80 {
  10989. break
  10990. }
  10991. }
  10992. case 6:
  10993. if wireType != 0 {
  10994. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10995. }
  10996. m.GasUsed = 0
  10997. for shift := uint(0); ; shift += 7 {
  10998. if shift >= 64 {
  10999. return ErrIntOverflowTypes
  11000. }
  11001. if iNdEx >= l {
  11002. return io.ErrUnexpectedEOF
  11003. }
  11004. b := dAtA[iNdEx]
  11005. iNdEx++
  11006. m.GasUsed |= int64(b&0x7F) << shift
  11007. if b < 0x80 {
  11008. break
  11009. }
  11010. }
  11011. case 7:
  11012. if wireType != 2 {
  11013. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11014. }
  11015. var msglen int
  11016. for shift := uint(0); ; shift += 7 {
  11017. if shift >= 64 {
  11018. return ErrIntOverflowTypes
  11019. }
  11020. if iNdEx >= l {
  11021. return io.ErrUnexpectedEOF
  11022. }
  11023. b := dAtA[iNdEx]
  11024. iNdEx++
  11025. msglen |= int(b&0x7F) << shift
  11026. if b < 0x80 {
  11027. break
  11028. }
  11029. }
  11030. if msglen < 0 {
  11031. return ErrInvalidLengthTypes
  11032. }
  11033. postIndex := iNdEx + msglen
  11034. if postIndex < 0 {
  11035. return ErrInvalidLengthTypes
  11036. }
  11037. if postIndex > l {
  11038. return io.ErrUnexpectedEOF
  11039. }
  11040. m.Events = append(m.Events, Event{})
  11041. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11042. return err
  11043. }
  11044. iNdEx = postIndex
  11045. case 8:
  11046. if wireType != 2 {
  11047. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  11048. }
  11049. var stringLen uint64
  11050. for shift := uint(0); ; shift += 7 {
  11051. if shift >= 64 {
  11052. return ErrIntOverflowTypes
  11053. }
  11054. if iNdEx >= l {
  11055. return io.ErrUnexpectedEOF
  11056. }
  11057. b := dAtA[iNdEx]
  11058. iNdEx++
  11059. stringLen |= uint64(b&0x7F) << shift
  11060. if b < 0x80 {
  11061. break
  11062. }
  11063. }
  11064. intStringLen := int(stringLen)
  11065. if intStringLen < 0 {
  11066. return ErrInvalidLengthTypes
  11067. }
  11068. postIndex := iNdEx + intStringLen
  11069. if postIndex < 0 {
  11070. return ErrInvalidLengthTypes
  11071. }
  11072. if postIndex > l {
  11073. return io.ErrUnexpectedEOF
  11074. }
  11075. m.Codespace = string(dAtA[iNdEx:postIndex])
  11076. iNdEx = postIndex
  11077. default:
  11078. iNdEx = preIndex
  11079. skippy, err := skipTypes(dAtA[iNdEx:])
  11080. if err != nil {
  11081. return err
  11082. }
  11083. if skippy < 0 {
  11084. return ErrInvalidLengthTypes
  11085. }
  11086. if (iNdEx + skippy) < 0 {
  11087. return ErrInvalidLengthTypes
  11088. }
  11089. if (iNdEx + skippy) > l {
  11090. return io.ErrUnexpectedEOF
  11091. }
  11092. iNdEx += skippy
  11093. }
  11094. }
  11095. if iNdEx > l {
  11096. return io.ErrUnexpectedEOF
  11097. }
  11098. return nil
  11099. }
  11100. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  11101. l := len(dAtA)
  11102. iNdEx := 0
  11103. for iNdEx < l {
  11104. preIndex := iNdEx
  11105. var wire uint64
  11106. for shift := uint(0); ; shift += 7 {
  11107. if shift >= 64 {
  11108. return ErrIntOverflowTypes
  11109. }
  11110. if iNdEx >= l {
  11111. return io.ErrUnexpectedEOF
  11112. }
  11113. b := dAtA[iNdEx]
  11114. iNdEx++
  11115. wire |= uint64(b&0x7F) << shift
  11116. if b < 0x80 {
  11117. break
  11118. }
  11119. }
  11120. fieldNum := int32(wire >> 3)
  11121. wireType := int(wire & 0x7)
  11122. if wireType == 4 {
  11123. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  11124. }
  11125. if fieldNum <= 0 {
  11126. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11127. }
  11128. switch fieldNum {
  11129. case 1:
  11130. if wireType != 2 {
  11131. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  11132. }
  11133. var msglen int
  11134. for shift := uint(0); ; shift += 7 {
  11135. if shift >= 64 {
  11136. return ErrIntOverflowTypes
  11137. }
  11138. if iNdEx >= l {
  11139. return io.ErrUnexpectedEOF
  11140. }
  11141. b := dAtA[iNdEx]
  11142. iNdEx++
  11143. msglen |= int(b&0x7F) << shift
  11144. if b < 0x80 {
  11145. break
  11146. }
  11147. }
  11148. if msglen < 0 {
  11149. return ErrInvalidLengthTypes
  11150. }
  11151. postIndex := iNdEx + msglen
  11152. if postIndex < 0 {
  11153. return ErrInvalidLengthTypes
  11154. }
  11155. if postIndex > l {
  11156. return io.ErrUnexpectedEOF
  11157. }
  11158. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  11159. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11160. return err
  11161. }
  11162. iNdEx = postIndex
  11163. case 2:
  11164. if wireType != 2 {
  11165. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  11166. }
  11167. var msglen int
  11168. for shift := uint(0); ; shift += 7 {
  11169. if shift >= 64 {
  11170. return ErrIntOverflowTypes
  11171. }
  11172. if iNdEx >= l {
  11173. return io.ErrUnexpectedEOF
  11174. }
  11175. b := dAtA[iNdEx]
  11176. iNdEx++
  11177. msglen |= int(b&0x7F) << shift
  11178. if b < 0x80 {
  11179. break
  11180. }
  11181. }
  11182. if msglen < 0 {
  11183. return ErrInvalidLengthTypes
  11184. }
  11185. postIndex := iNdEx + msglen
  11186. if postIndex < 0 {
  11187. return ErrInvalidLengthTypes
  11188. }
  11189. if postIndex > l {
  11190. return io.ErrUnexpectedEOF
  11191. }
  11192. if m.ConsensusParamUpdates == nil {
  11193. m.ConsensusParamUpdates = &ConsensusParams{}
  11194. }
  11195. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11196. return err
  11197. }
  11198. iNdEx = postIndex
  11199. case 3:
  11200. if wireType != 2 {
  11201. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11202. }
  11203. var msglen int
  11204. for shift := uint(0); ; shift += 7 {
  11205. if shift >= 64 {
  11206. return ErrIntOverflowTypes
  11207. }
  11208. if iNdEx >= l {
  11209. return io.ErrUnexpectedEOF
  11210. }
  11211. b := dAtA[iNdEx]
  11212. iNdEx++
  11213. msglen |= int(b&0x7F) << shift
  11214. if b < 0x80 {
  11215. break
  11216. }
  11217. }
  11218. if msglen < 0 {
  11219. return ErrInvalidLengthTypes
  11220. }
  11221. postIndex := iNdEx + msglen
  11222. if postIndex < 0 {
  11223. return ErrInvalidLengthTypes
  11224. }
  11225. if postIndex > l {
  11226. return io.ErrUnexpectedEOF
  11227. }
  11228. m.Events = append(m.Events, Event{})
  11229. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11230. return err
  11231. }
  11232. iNdEx = postIndex
  11233. default:
  11234. iNdEx = preIndex
  11235. skippy, err := skipTypes(dAtA[iNdEx:])
  11236. if err != nil {
  11237. return err
  11238. }
  11239. if skippy < 0 {
  11240. return ErrInvalidLengthTypes
  11241. }
  11242. if (iNdEx + skippy) < 0 {
  11243. return ErrInvalidLengthTypes
  11244. }
  11245. if (iNdEx + skippy) > l {
  11246. return io.ErrUnexpectedEOF
  11247. }
  11248. iNdEx += skippy
  11249. }
  11250. }
  11251. if iNdEx > l {
  11252. return io.ErrUnexpectedEOF
  11253. }
  11254. return nil
  11255. }
  11256. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11257. l := len(dAtA)
  11258. iNdEx := 0
  11259. for iNdEx < l {
  11260. preIndex := iNdEx
  11261. var wire uint64
  11262. for shift := uint(0); ; shift += 7 {
  11263. if shift >= 64 {
  11264. return ErrIntOverflowTypes
  11265. }
  11266. if iNdEx >= l {
  11267. return io.ErrUnexpectedEOF
  11268. }
  11269. b := dAtA[iNdEx]
  11270. iNdEx++
  11271. wire |= uint64(b&0x7F) << shift
  11272. if b < 0x80 {
  11273. break
  11274. }
  11275. }
  11276. fieldNum := int32(wire >> 3)
  11277. wireType := int(wire & 0x7)
  11278. if wireType == 4 {
  11279. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11280. }
  11281. if fieldNum <= 0 {
  11282. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11283. }
  11284. switch fieldNum {
  11285. case 2:
  11286. if wireType != 2 {
  11287. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11288. }
  11289. var byteLen int
  11290. for shift := uint(0); ; shift += 7 {
  11291. if shift >= 64 {
  11292. return ErrIntOverflowTypes
  11293. }
  11294. if iNdEx >= l {
  11295. return io.ErrUnexpectedEOF
  11296. }
  11297. b := dAtA[iNdEx]
  11298. iNdEx++
  11299. byteLen |= int(b&0x7F) << shift
  11300. if b < 0x80 {
  11301. break
  11302. }
  11303. }
  11304. if byteLen < 0 {
  11305. return ErrInvalidLengthTypes
  11306. }
  11307. postIndex := iNdEx + byteLen
  11308. if postIndex < 0 {
  11309. return ErrInvalidLengthTypes
  11310. }
  11311. if postIndex > l {
  11312. return io.ErrUnexpectedEOF
  11313. }
  11314. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11315. if m.Data == nil {
  11316. m.Data = []byte{}
  11317. }
  11318. iNdEx = postIndex
  11319. case 3:
  11320. if wireType != 0 {
  11321. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11322. }
  11323. m.RetainHeight = 0
  11324. for shift := uint(0); ; shift += 7 {
  11325. if shift >= 64 {
  11326. return ErrIntOverflowTypes
  11327. }
  11328. if iNdEx >= l {
  11329. return io.ErrUnexpectedEOF
  11330. }
  11331. b := dAtA[iNdEx]
  11332. iNdEx++
  11333. m.RetainHeight |= int64(b&0x7F) << shift
  11334. if b < 0x80 {
  11335. break
  11336. }
  11337. }
  11338. default:
  11339. iNdEx = preIndex
  11340. skippy, err := skipTypes(dAtA[iNdEx:])
  11341. if err != nil {
  11342. return err
  11343. }
  11344. if skippy < 0 {
  11345. return ErrInvalidLengthTypes
  11346. }
  11347. if (iNdEx + skippy) < 0 {
  11348. return ErrInvalidLengthTypes
  11349. }
  11350. if (iNdEx + skippy) > l {
  11351. return io.ErrUnexpectedEOF
  11352. }
  11353. iNdEx += skippy
  11354. }
  11355. }
  11356. if iNdEx > l {
  11357. return io.ErrUnexpectedEOF
  11358. }
  11359. return nil
  11360. }
  11361. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11362. l := len(dAtA)
  11363. iNdEx := 0
  11364. for iNdEx < l {
  11365. preIndex := iNdEx
  11366. var wire uint64
  11367. for shift := uint(0); ; shift += 7 {
  11368. if shift >= 64 {
  11369. return ErrIntOverflowTypes
  11370. }
  11371. if iNdEx >= l {
  11372. return io.ErrUnexpectedEOF
  11373. }
  11374. b := dAtA[iNdEx]
  11375. iNdEx++
  11376. wire |= uint64(b&0x7F) << shift
  11377. if b < 0x80 {
  11378. break
  11379. }
  11380. }
  11381. fieldNum := int32(wire >> 3)
  11382. wireType := int(wire & 0x7)
  11383. if wireType == 4 {
  11384. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11385. }
  11386. if fieldNum <= 0 {
  11387. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11388. }
  11389. switch fieldNum {
  11390. case 1:
  11391. if wireType != 2 {
  11392. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11393. }
  11394. var msglen int
  11395. for shift := uint(0); ; shift += 7 {
  11396. if shift >= 64 {
  11397. return ErrIntOverflowTypes
  11398. }
  11399. if iNdEx >= l {
  11400. return io.ErrUnexpectedEOF
  11401. }
  11402. b := dAtA[iNdEx]
  11403. iNdEx++
  11404. msglen |= int(b&0x7F) << shift
  11405. if b < 0x80 {
  11406. break
  11407. }
  11408. }
  11409. if msglen < 0 {
  11410. return ErrInvalidLengthTypes
  11411. }
  11412. postIndex := iNdEx + msglen
  11413. if postIndex < 0 {
  11414. return ErrInvalidLengthTypes
  11415. }
  11416. if postIndex > l {
  11417. return io.ErrUnexpectedEOF
  11418. }
  11419. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11420. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11421. return err
  11422. }
  11423. iNdEx = postIndex
  11424. default:
  11425. iNdEx = preIndex
  11426. skippy, err := skipTypes(dAtA[iNdEx:])
  11427. if err != nil {
  11428. return err
  11429. }
  11430. if skippy < 0 {
  11431. return ErrInvalidLengthTypes
  11432. }
  11433. if (iNdEx + skippy) < 0 {
  11434. return ErrInvalidLengthTypes
  11435. }
  11436. if (iNdEx + skippy) > l {
  11437. return io.ErrUnexpectedEOF
  11438. }
  11439. iNdEx += skippy
  11440. }
  11441. }
  11442. if iNdEx > l {
  11443. return io.ErrUnexpectedEOF
  11444. }
  11445. return nil
  11446. }
  11447. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11448. l := len(dAtA)
  11449. iNdEx := 0
  11450. for iNdEx < l {
  11451. preIndex := iNdEx
  11452. var wire uint64
  11453. for shift := uint(0); ; shift += 7 {
  11454. if shift >= 64 {
  11455. return ErrIntOverflowTypes
  11456. }
  11457. if iNdEx >= l {
  11458. return io.ErrUnexpectedEOF
  11459. }
  11460. b := dAtA[iNdEx]
  11461. iNdEx++
  11462. wire |= uint64(b&0x7F) << shift
  11463. if b < 0x80 {
  11464. break
  11465. }
  11466. }
  11467. fieldNum := int32(wire >> 3)
  11468. wireType := int(wire & 0x7)
  11469. if wireType == 4 {
  11470. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11471. }
  11472. if fieldNum <= 0 {
  11473. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11474. }
  11475. switch fieldNum {
  11476. case 1:
  11477. if wireType != 0 {
  11478. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11479. }
  11480. m.Result = 0
  11481. for shift := uint(0); ; shift += 7 {
  11482. if shift >= 64 {
  11483. return ErrIntOverflowTypes
  11484. }
  11485. if iNdEx >= l {
  11486. return io.ErrUnexpectedEOF
  11487. }
  11488. b := dAtA[iNdEx]
  11489. iNdEx++
  11490. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11491. if b < 0x80 {
  11492. break
  11493. }
  11494. }
  11495. default:
  11496. iNdEx = preIndex
  11497. skippy, err := skipTypes(dAtA[iNdEx:])
  11498. if err != nil {
  11499. return err
  11500. }
  11501. if skippy < 0 {
  11502. return ErrInvalidLengthTypes
  11503. }
  11504. if (iNdEx + skippy) < 0 {
  11505. return ErrInvalidLengthTypes
  11506. }
  11507. if (iNdEx + skippy) > l {
  11508. return io.ErrUnexpectedEOF
  11509. }
  11510. iNdEx += skippy
  11511. }
  11512. }
  11513. if iNdEx > l {
  11514. return io.ErrUnexpectedEOF
  11515. }
  11516. return nil
  11517. }
  11518. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11519. l := len(dAtA)
  11520. iNdEx := 0
  11521. for iNdEx < l {
  11522. preIndex := iNdEx
  11523. var wire uint64
  11524. for shift := uint(0); ; shift += 7 {
  11525. if shift >= 64 {
  11526. return ErrIntOverflowTypes
  11527. }
  11528. if iNdEx >= l {
  11529. return io.ErrUnexpectedEOF
  11530. }
  11531. b := dAtA[iNdEx]
  11532. iNdEx++
  11533. wire |= uint64(b&0x7F) << shift
  11534. if b < 0x80 {
  11535. break
  11536. }
  11537. }
  11538. fieldNum := int32(wire >> 3)
  11539. wireType := int(wire & 0x7)
  11540. if wireType == 4 {
  11541. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11542. }
  11543. if fieldNum <= 0 {
  11544. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11545. }
  11546. switch fieldNum {
  11547. case 1:
  11548. if wireType != 2 {
  11549. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11550. }
  11551. var byteLen int
  11552. for shift := uint(0); ; shift += 7 {
  11553. if shift >= 64 {
  11554. return ErrIntOverflowTypes
  11555. }
  11556. if iNdEx >= l {
  11557. return io.ErrUnexpectedEOF
  11558. }
  11559. b := dAtA[iNdEx]
  11560. iNdEx++
  11561. byteLen |= int(b&0x7F) << shift
  11562. if b < 0x80 {
  11563. break
  11564. }
  11565. }
  11566. if byteLen < 0 {
  11567. return ErrInvalidLengthTypes
  11568. }
  11569. postIndex := iNdEx + byteLen
  11570. if postIndex < 0 {
  11571. return ErrInvalidLengthTypes
  11572. }
  11573. if postIndex > l {
  11574. return io.ErrUnexpectedEOF
  11575. }
  11576. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11577. if m.Chunk == nil {
  11578. m.Chunk = []byte{}
  11579. }
  11580. iNdEx = postIndex
  11581. default:
  11582. iNdEx = preIndex
  11583. skippy, err := skipTypes(dAtA[iNdEx:])
  11584. if err != nil {
  11585. return err
  11586. }
  11587. if skippy < 0 {
  11588. return ErrInvalidLengthTypes
  11589. }
  11590. if (iNdEx + skippy) < 0 {
  11591. return ErrInvalidLengthTypes
  11592. }
  11593. if (iNdEx + skippy) > l {
  11594. return io.ErrUnexpectedEOF
  11595. }
  11596. iNdEx += skippy
  11597. }
  11598. }
  11599. if iNdEx > l {
  11600. return io.ErrUnexpectedEOF
  11601. }
  11602. return nil
  11603. }
  11604. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11605. l := len(dAtA)
  11606. iNdEx := 0
  11607. for iNdEx < l {
  11608. preIndex := iNdEx
  11609. var wire uint64
  11610. for shift := uint(0); ; shift += 7 {
  11611. if shift >= 64 {
  11612. return ErrIntOverflowTypes
  11613. }
  11614. if iNdEx >= l {
  11615. return io.ErrUnexpectedEOF
  11616. }
  11617. b := dAtA[iNdEx]
  11618. iNdEx++
  11619. wire |= uint64(b&0x7F) << shift
  11620. if b < 0x80 {
  11621. break
  11622. }
  11623. }
  11624. fieldNum := int32(wire >> 3)
  11625. wireType := int(wire & 0x7)
  11626. if wireType == 4 {
  11627. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11628. }
  11629. if fieldNum <= 0 {
  11630. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11631. }
  11632. switch fieldNum {
  11633. case 1:
  11634. if wireType != 0 {
  11635. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11636. }
  11637. m.Result = 0
  11638. for shift := uint(0); ; shift += 7 {
  11639. if shift >= 64 {
  11640. return ErrIntOverflowTypes
  11641. }
  11642. if iNdEx >= l {
  11643. return io.ErrUnexpectedEOF
  11644. }
  11645. b := dAtA[iNdEx]
  11646. iNdEx++
  11647. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11648. if b < 0x80 {
  11649. break
  11650. }
  11651. }
  11652. case 2:
  11653. if wireType == 0 {
  11654. var v uint32
  11655. for shift := uint(0); ; shift += 7 {
  11656. if shift >= 64 {
  11657. return ErrIntOverflowTypes
  11658. }
  11659. if iNdEx >= l {
  11660. return io.ErrUnexpectedEOF
  11661. }
  11662. b := dAtA[iNdEx]
  11663. iNdEx++
  11664. v |= uint32(b&0x7F) << shift
  11665. if b < 0x80 {
  11666. break
  11667. }
  11668. }
  11669. m.RefetchChunks = append(m.RefetchChunks, v)
  11670. } else if wireType == 2 {
  11671. var packedLen int
  11672. for shift := uint(0); ; shift += 7 {
  11673. if shift >= 64 {
  11674. return ErrIntOverflowTypes
  11675. }
  11676. if iNdEx >= l {
  11677. return io.ErrUnexpectedEOF
  11678. }
  11679. b := dAtA[iNdEx]
  11680. iNdEx++
  11681. packedLen |= int(b&0x7F) << shift
  11682. if b < 0x80 {
  11683. break
  11684. }
  11685. }
  11686. if packedLen < 0 {
  11687. return ErrInvalidLengthTypes
  11688. }
  11689. postIndex := iNdEx + packedLen
  11690. if postIndex < 0 {
  11691. return ErrInvalidLengthTypes
  11692. }
  11693. if postIndex > l {
  11694. return io.ErrUnexpectedEOF
  11695. }
  11696. var elementCount int
  11697. var count int
  11698. for _, integer := range dAtA[iNdEx:postIndex] {
  11699. if integer < 128 {
  11700. count++
  11701. }
  11702. }
  11703. elementCount = count
  11704. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11705. m.RefetchChunks = make([]uint32, 0, elementCount)
  11706. }
  11707. for iNdEx < postIndex {
  11708. var v uint32
  11709. for shift := uint(0); ; shift += 7 {
  11710. if shift >= 64 {
  11711. return ErrIntOverflowTypes
  11712. }
  11713. if iNdEx >= l {
  11714. return io.ErrUnexpectedEOF
  11715. }
  11716. b := dAtA[iNdEx]
  11717. iNdEx++
  11718. v |= uint32(b&0x7F) << shift
  11719. if b < 0x80 {
  11720. break
  11721. }
  11722. }
  11723. m.RefetchChunks = append(m.RefetchChunks, v)
  11724. }
  11725. } else {
  11726. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11727. }
  11728. case 3:
  11729. if wireType != 2 {
  11730. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11731. }
  11732. var stringLen uint64
  11733. for shift := uint(0); ; shift += 7 {
  11734. if shift >= 64 {
  11735. return ErrIntOverflowTypes
  11736. }
  11737. if iNdEx >= l {
  11738. return io.ErrUnexpectedEOF
  11739. }
  11740. b := dAtA[iNdEx]
  11741. iNdEx++
  11742. stringLen |= uint64(b&0x7F) << shift
  11743. if b < 0x80 {
  11744. break
  11745. }
  11746. }
  11747. intStringLen := int(stringLen)
  11748. if intStringLen < 0 {
  11749. return ErrInvalidLengthTypes
  11750. }
  11751. postIndex := iNdEx + intStringLen
  11752. if postIndex < 0 {
  11753. return ErrInvalidLengthTypes
  11754. }
  11755. if postIndex > l {
  11756. return io.ErrUnexpectedEOF
  11757. }
  11758. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11759. iNdEx = postIndex
  11760. default:
  11761. iNdEx = preIndex
  11762. skippy, err := skipTypes(dAtA[iNdEx:])
  11763. if err != nil {
  11764. return err
  11765. }
  11766. if skippy < 0 {
  11767. return ErrInvalidLengthTypes
  11768. }
  11769. if (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 *ConsensusParams) 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: ConsensusParams: wiretype end group for non-group")
  11807. }
  11808. if fieldNum <= 0 {
  11809. return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
  11810. }
  11811. switch fieldNum {
  11812. case 1:
  11813. if wireType != 2 {
  11814. return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  11815. }
  11816. var msglen 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. msglen |= int(b&0x7F) << shift
  11827. if b < 0x80 {
  11828. break
  11829. }
  11830. }
  11831. if msglen < 0 {
  11832. return ErrInvalidLengthTypes
  11833. }
  11834. postIndex := iNdEx + msglen
  11835. if postIndex < 0 {
  11836. return ErrInvalidLengthTypes
  11837. }
  11838. if postIndex > l {
  11839. return io.ErrUnexpectedEOF
  11840. }
  11841. if m.Block == nil {
  11842. m.Block = &BlockParams{}
  11843. }
  11844. if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11845. return err
  11846. }
  11847. iNdEx = postIndex
  11848. case 2:
  11849. if wireType != 2 {
  11850. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  11851. }
  11852. var msglen int
  11853. for shift := uint(0); ; shift += 7 {
  11854. if shift >= 64 {
  11855. return ErrIntOverflowTypes
  11856. }
  11857. if iNdEx >= l {
  11858. return io.ErrUnexpectedEOF
  11859. }
  11860. b := dAtA[iNdEx]
  11861. iNdEx++
  11862. msglen |= int(b&0x7F) << shift
  11863. if b < 0x80 {
  11864. break
  11865. }
  11866. }
  11867. if msglen < 0 {
  11868. return ErrInvalidLengthTypes
  11869. }
  11870. postIndex := iNdEx + msglen
  11871. if postIndex < 0 {
  11872. return ErrInvalidLengthTypes
  11873. }
  11874. if postIndex > l {
  11875. return io.ErrUnexpectedEOF
  11876. }
  11877. if m.Evidence == nil {
  11878. m.Evidence = &types1.EvidenceParams{}
  11879. }
  11880. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11881. return err
  11882. }
  11883. iNdEx = postIndex
  11884. case 3:
  11885. if wireType != 2 {
  11886. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  11887. }
  11888. var msglen int
  11889. for shift := uint(0); ; shift += 7 {
  11890. if shift >= 64 {
  11891. return ErrIntOverflowTypes
  11892. }
  11893. if iNdEx >= l {
  11894. return io.ErrUnexpectedEOF
  11895. }
  11896. b := dAtA[iNdEx]
  11897. iNdEx++
  11898. msglen |= int(b&0x7F) << shift
  11899. if b < 0x80 {
  11900. break
  11901. }
  11902. }
  11903. if msglen < 0 {
  11904. return ErrInvalidLengthTypes
  11905. }
  11906. postIndex := iNdEx + msglen
  11907. if postIndex < 0 {
  11908. return ErrInvalidLengthTypes
  11909. }
  11910. if postIndex > l {
  11911. return io.ErrUnexpectedEOF
  11912. }
  11913. if m.Validator == nil {
  11914. m.Validator = &types1.ValidatorParams{}
  11915. }
  11916. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11917. return err
  11918. }
  11919. iNdEx = postIndex
  11920. case 4:
  11921. if wireType != 2 {
  11922. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  11923. }
  11924. var msglen int
  11925. for shift := uint(0); ; shift += 7 {
  11926. if shift >= 64 {
  11927. return ErrIntOverflowTypes
  11928. }
  11929. if iNdEx >= l {
  11930. return io.ErrUnexpectedEOF
  11931. }
  11932. b := dAtA[iNdEx]
  11933. iNdEx++
  11934. msglen |= int(b&0x7F) << shift
  11935. if b < 0x80 {
  11936. break
  11937. }
  11938. }
  11939. if msglen < 0 {
  11940. return ErrInvalidLengthTypes
  11941. }
  11942. postIndex := iNdEx + msglen
  11943. if postIndex < 0 {
  11944. return ErrInvalidLengthTypes
  11945. }
  11946. if postIndex > l {
  11947. return io.ErrUnexpectedEOF
  11948. }
  11949. if m.Version == nil {
  11950. m.Version = &types1.VersionParams{}
  11951. }
  11952. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11953. return err
  11954. }
  11955. iNdEx = postIndex
  11956. default:
  11957. iNdEx = preIndex
  11958. skippy, err := skipTypes(dAtA[iNdEx:])
  11959. if err != nil {
  11960. return err
  11961. }
  11962. if skippy < 0 {
  11963. return ErrInvalidLengthTypes
  11964. }
  11965. if (iNdEx + skippy) < 0 {
  11966. return ErrInvalidLengthTypes
  11967. }
  11968. if (iNdEx + skippy) > l {
  11969. return io.ErrUnexpectedEOF
  11970. }
  11971. iNdEx += skippy
  11972. }
  11973. }
  11974. if iNdEx > l {
  11975. return io.ErrUnexpectedEOF
  11976. }
  11977. return nil
  11978. }
  11979. func (m *BlockParams) Unmarshal(dAtA []byte) error {
  11980. l := len(dAtA)
  11981. iNdEx := 0
  11982. for iNdEx < l {
  11983. preIndex := iNdEx
  11984. var wire uint64
  11985. for shift := uint(0); ; shift += 7 {
  11986. if shift >= 64 {
  11987. return ErrIntOverflowTypes
  11988. }
  11989. if iNdEx >= l {
  11990. return io.ErrUnexpectedEOF
  11991. }
  11992. b := dAtA[iNdEx]
  11993. iNdEx++
  11994. wire |= uint64(b&0x7F) << shift
  11995. if b < 0x80 {
  11996. break
  11997. }
  11998. }
  11999. fieldNum := int32(wire >> 3)
  12000. wireType := int(wire & 0x7)
  12001. if wireType == 4 {
  12002. return fmt.Errorf("proto: BlockParams: wiretype end group for non-group")
  12003. }
  12004. if fieldNum <= 0 {
  12005. return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
  12006. }
  12007. switch fieldNum {
  12008. case 1:
  12009. if wireType != 0 {
  12010. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  12011. }
  12012. m.MaxBytes = 0
  12013. for shift := uint(0); ; shift += 7 {
  12014. if shift >= 64 {
  12015. return ErrIntOverflowTypes
  12016. }
  12017. if iNdEx >= l {
  12018. return io.ErrUnexpectedEOF
  12019. }
  12020. b := dAtA[iNdEx]
  12021. iNdEx++
  12022. m.MaxBytes |= int64(b&0x7F) << shift
  12023. if b < 0x80 {
  12024. break
  12025. }
  12026. }
  12027. case 2:
  12028. if wireType != 0 {
  12029. return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
  12030. }
  12031. m.MaxGas = 0
  12032. for shift := uint(0); ; shift += 7 {
  12033. if shift >= 64 {
  12034. return ErrIntOverflowTypes
  12035. }
  12036. if iNdEx >= l {
  12037. return io.ErrUnexpectedEOF
  12038. }
  12039. b := dAtA[iNdEx]
  12040. iNdEx++
  12041. m.MaxGas |= int64(b&0x7F) << shift
  12042. if b < 0x80 {
  12043. break
  12044. }
  12045. }
  12046. default:
  12047. iNdEx = preIndex
  12048. skippy, err := skipTypes(dAtA[iNdEx:])
  12049. if err != nil {
  12050. return err
  12051. }
  12052. if skippy < 0 {
  12053. return ErrInvalidLengthTypes
  12054. }
  12055. if (iNdEx + skippy) < 0 {
  12056. return ErrInvalidLengthTypes
  12057. }
  12058. if (iNdEx + skippy) > l {
  12059. return io.ErrUnexpectedEOF
  12060. }
  12061. iNdEx += skippy
  12062. }
  12063. }
  12064. if iNdEx > l {
  12065. return io.ErrUnexpectedEOF
  12066. }
  12067. return nil
  12068. }
  12069. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  12070. l := len(dAtA)
  12071. iNdEx := 0
  12072. for iNdEx < l {
  12073. preIndex := iNdEx
  12074. var wire uint64
  12075. for shift := uint(0); ; shift += 7 {
  12076. if shift >= 64 {
  12077. return ErrIntOverflowTypes
  12078. }
  12079. if iNdEx >= l {
  12080. return io.ErrUnexpectedEOF
  12081. }
  12082. b := dAtA[iNdEx]
  12083. iNdEx++
  12084. wire |= uint64(b&0x7F) << shift
  12085. if b < 0x80 {
  12086. break
  12087. }
  12088. }
  12089. fieldNum := int32(wire >> 3)
  12090. wireType := int(wire & 0x7)
  12091. if wireType == 4 {
  12092. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  12093. }
  12094. if fieldNum <= 0 {
  12095. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12096. }
  12097. switch fieldNum {
  12098. case 1:
  12099. if wireType != 0 {
  12100. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  12101. }
  12102. m.Round = 0
  12103. for shift := uint(0); ; shift += 7 {
  12104. if shift >= 64 {
  12105. return ErrIntOverflowTypes
  12106. }
  12107. if iNdEx >= l {
  12108. return io.ErrUnexpectedEOF
  12109. }
  12110. b := dAtA[iNdEx]
  12111. iNdEx++
  12112. m.Round |= int32(b&0x7F) << shift
  12113. if b < 0x80 {
  12114. break
  12115. }
  12116. }
  12117. case 2:
  12118. if wireType != 2 {
  12119. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  12120. }
  12121. var msglen int
  12122. for shift := uint(0); ; shift += 7 {
  12123. if shift >= 64 {
  12124. return ErrIntOverflowTypes
  12125. }
  12126. if iNdEx >= l {
  12127. return io.ErrUnexpectedEOF
  12128. }
  12129. b := dAtA[iNdEx]
  12130. iNdEx++
  12131. msglen |= int(b&0x7F) << shift
  12132. if b < 0x80 {
  12133. break
  12134. }
  12135. }
  12136. if msglen < 0 {
  12137. return ErrInvalidLengthTypes
  12138. }
  12139. postIndex := iNdEx + msglen
  12140. if postIndex < 0 {
  12141. return ErrInvalidLengthTypes
  12142. }
  12143. if postIndex > l {
  12144. return io.ErrUnexpectedEOF
  12145. }
  12146. m.Votes = append(m.Votes, VoteInfo{})
  12147. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12148. return err
  12149. }
  12150. iNdEx = postIndex
  12151. default:
  12152. iNdEx = preIndex
  12153. skippy, err := skipTypes(dAtA[iNdEx:])
  12154. if err != nil {
  12155. return err
  12156. }
  12157. if skippy < 0 {
  12158. return ErrInvalidLengthTypes
  12159. }
  12160. if (iNdEx + skippy) < 0 {
  12161. return ErrInvalidLengthTypes
  12162. }
  12163. if (iNdEx + skippy) > l {
  12164. return io.ErrUnexpectedEOF
  12165. }
  12166. iNdEx += skippy
  12167. }
  12168. }
  12169. if iNdEx > l {
  12170. return io.ErrUnexpectedEOF
  12171. }
  12172. return nil
  12173. }
  12174. func (m *Event) Unmarshal(dAtA []byte) error {
  12175. l := len(dAtA)
  12176. iNdEx := 0
  12177. for iNdEx < l {
  12178. preIndex := iNdEx
  12179. var wire uint64
  12180. for shift := uint(0); ; shift += 7 {
  12181. if shift >= 64 {
  12182. return ErrIntOverflowTypes
  12183. }
  12184. if iNdEx >= l {
  12185. return io.ErrUnexpectedEOF
  12186. }
  12187. b := dAtA[iNdEx]
  12188. iNdEx++
  12189. wire |= uint64(b&0x7F) << shift
  12190. if b < 0x80 {
  12191. break
  12192. }
  12193. }
  12194. fieldNum := int32(wire >> 3)
  12195. wireType := int(wire & 0x7)
  12196. if wireType == 4 {
  12197. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  12198. }
  12199. if fieldNum <= 0 {
  12200. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  12201. }
  12202. switch fieldNum {
  12203. case 1:
  12204. if wireType != 2 {
  12205. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12206. }
  12207. var stringLen uint64
  12208. for shift := uint(0); ; shift += 7 {
  12209. if shift >= 64 {
  12210. return ErrIntOverflowTypes
  12211. }
  12212. if iNdEx >= l {
  12213. return io.ErrUnexpectedEOF
  12214. }
  12215. b := dAtA[iNdEx]
  12216. iNdEx++
  12217. stringLen |= uint64(b&0x7F) << shift
  12218. if b < 0x80 {
  12219. break
  12220. }
  12221. }
  12222. intStringLen := int(stringLen)
  12223. if intStringLen < 0 {
  12224. return ErrInvalidLengthTypes
  12225. }
  12226. postIndex := iNdEx + intStringLen
  12227. if postIndex < 0 {
  12228. return ErrInvalidLengthTypes
  12229. }
  12230. if postIndex > l {
  12231. return io.ErrUnexpectedEOF
  12232. }
  12233. m.Type = string(dAtA[iNdEx:postIndex])
  12234. iNdEx = postIndex
  12235. case 2:
  12236. if wireType != 2 {
  12237. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  12238. }
  12239. var msglen int
  12240. for shift := uint(0); ; shift += 7 {
  12241. if shift >= 64 {
  12242. return ErrIntOverflowTypes
  12243. }
  12244. if iNdEx >= l {
  12245. return io.ErrUnexpectedEOF
  12246. }
  12247. b := dAtA[iNdEx]
  12248. iNdEx++
  12249. msglen |= int(b&0x7F) << shift
  12250. if b < 0x80 {
  12251. break
  12252. }
  12253. }
  12254. if msglen < 0 {
  12255. return ErrInvalidLengthTypes
  12256. }
  12257. postIndex := iNdEx + msglen
  12258. if postIndex < 0 {
  12259. return ErrInvalidLengthTypes
  12260. }
  12261. if postIndex > l {
  12262. return io.ErrUnexpectedEOF
  12263. }
  12264. m.Attributes = append(m.Attributes, EventAttribute{})
  12265. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12266. return err
  12267. }
  12268. iNdEx = postIndex
  12269. default:
  12270. iNdEx = preIndex
  12271. skippy, err := skipTypes(dAtA[iNdEx:])
  12272. if err != nil {
  12273. return err
  12274. }
  12275. if skippy < 0 {
  12276. return ErrInvalidLengthTypes
  12277. }
  12278. if (iNdEx + skippy) < 0 {
  12279. return ErrInvalidLengthTypes
  12280. }
  12281. if (iNdEx + skippy) > l {
  12282. return io.ErrUnexpectedEOF
  12283. }
  12284. iNdEx += skippy
  12285. }
  12286. }
  12287. if iNdEx > l {
  12288. return io.ErrUnexpectedEOF
  12289. }
  12290. return nil
  12291. }
  12292. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  12293. l := len(dAtA)
  12294. iNdEx := 0
  12295. for iNdEx < l {
  12296. preIndex := iNdEx
  12297. var wire uint64
  12298. for shift := uint(0); ; shift += 7 {
  12299. if shift >= 64 {
  12300. return ErrIntOverflowTypes
  12301. }
  12302. if iNdEx >= l {
  12303. return io.ErrUnexpectedEOF
  12304. }
  12305. b := dAtA[iNdEx]
  12306. iNdEx++
  12307. wire |= uint64(b&0x7F) << shift
  12308. if b < 0x80 {
  12309. break
  12310. }
  12311. }
  12312. fieldNum := int32(wire >> 3)
  12313. wireType := int(wire & 0x7)
  12314. if wireType == 4 {
  12315. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  12316. }
  12317. if fieldNum <= 0 {
  12318. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  12319. }
  12320. switch fieldNum {
  12321. case 1:
  12322. if wireType != 2 {
  12323. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  12324. }
  12325. var byteLen int
  12326. for shift := uint(0); ; shift += 7 {
  12327. if shift >= 64 {
  12328. return ErrIntOverflowTypes
  12329. }
  12330. if iNdEx >= l {
  12331. return io.ErrUnexpectedEOF
  12332. }
  12333. b := dAtA[iNdEx]
  12334. iNdEx++
  12335. byteLen |= int(b&0x7F) << shift
  12336. if b < 0x80 {
  12337. break
  12338. }
  12339. }
  12340. if byteLen < 0 {
  12341. return ErrInvalidLengthTypes
  12342. }
  12343. postIndex := iNdEx + byteLen
  12344. if postIndex < 0 {
  12345. return ErrInvalidLengthTypes
  12346. }
  12347. if postIndex > l {
  12348. return io.ErrUnexpectedEOF
  12349. }
  12350. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  12351. if m.Key == nil {
  12352. m.Key = []byte{}
  12353. }
  12354. iNdEx = postIndex
  12355. case 2:
  12356. if wireType != 2 {
  12357. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  12358. }
  12359. var byteLen int
  12360. for shift := uint(0); ; shift += 7 {
  12361. if shift >= 64 {
  12362. return ErrIntOverflowTypes
  12363. }
  12364. if iNdEx >= l {
  12365. return io.ErrUnexpectedEOF
  12366. }
  12367. b := dAtA[iNdEx]
  12368. iNdEx++
  12369. byteLen |= int(b&0x7F) << shift
  12370. if b < 0x80 {
  12371. break
  12372. }
  12373. }
  12374. if byteLen < 0 {
  12375. return ErrInvalidLengthTypes
  12376. }
  12377. postIndex := iNdEx + byteLen
  12378. if postIndex < 0 {
  12379. return ErrInvalidLengthTypes
  12380. }
  12381. if postIndex > l {
  12382. return io.ErrUnexpectedEOF
  12383. }
  12384. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  12385. if m.Value == nil {
  12386. m.Value = []byte{}
  12387. }
  12388. iNdEx = postIndex
  12389. case 3:
  12390. if wireType != 0 {
  12391. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12392. }
  12393. var v int
  12394. for shift := uint(0); ; shift += 7 {
  12395. if shift >= 64 {
  12396. return ErrIntOverflowTypes
  12397. }
  12398. if iNdEx >= l {
  12399. return io.ErrUnexpectedEOF
  12400. }
  12401. b := dAtA[iNdEx]
  12402. iNdEx++
  12403. v |= int(b&0x7F) << shift
  12404. if b < 0x80 {
  12405. break
  12406. }
  12407. }
  12408. m.Index = bool(v != 0)
  12409. default:
  12410. iNdEx = preIndex
  12411. skippy, err := skipTypes(dAtA[iNdEx:])
  12412. if err != nil {
  12413. return err
  12414. }
  12415. if skippy < 0 {
  12416. return ErrInvalidLengthTypes
  12417. }
  12418. if (iNdEx + skippy) < 0 {
  12419. return ErrInvalidLengthTypes
  12420. }
  12421. if (iNdEx + skippy) > l {
  12422. return io.ErrUnexpectedEOF
  12423. }
  12424. iNdEx += skippy
  12425. }
  12426. }
  12427. if iNdEx > l {
  12428. return io.ErrUnexpectedEOF
  12429. }
  12430. return nil
  12431. }
  12432. func (m *TxResult) Unmarshal(dAtA []byte) error {
  12433. l := len(dAtA)
  12434. iNdEx := 0
  12435. for iNdEx < l {
  12436. preIndex := iNdEx
  12437. var wire uint64
  12438. for shift := uint(0); ; shift += 7 {
  12439. if shift >= 64 {
  12440. return ErrIntOverflowTypes
  12441. }
  12442. if iNdEx >= l {
  12443. return io.ErrUnexpectedEOF
  12444. }
  12445. b := dAtA[iNdEx]
  12446. iNdEx++
  12447. wire |= uint64(b&0x7F) << shift
  12448. if b < 0x80 {
  12449. break
  12450. }
  12451. }
  12452. fieldNum := int32(wire >> 3)
  12453. wireType := int(wire & 0x7)
  12454. if wireType == 4 {
  12455. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  12456. }
  12457. if fieldNum <= 0 {
  12458. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  12459. }
  12460. switch fieldNum {
  12461. case 1:
  12462. if wireType != 0 {
  12463. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12464. }
  12465. m.Height = 0
  12466. for shift := uint(0); ; shift += 7 {
  12467. if shift >= 64 {
  12468. return ErrIntOverflowTypes
  12469. }
  12470. if iNdEx >= l {
  12471. return io.ErrUnexpectedEOF
  12472. }
  12473. b := dAtA[iNdEx]
  12474. iNdEx++
  12475. m.Height |= int64(b&0x7F) << shift
  12476. if b < 0x80 {
  12477. break
  12478. }
  12479. }
  12480. case 2:
  12481. if wireType != 0 {
  12482. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12483. }
  12484. m.Index = 0
  12485. for shift := uint(0); ; shift += 7 {
  12486. if shift >= 64 {
  12487. return ErrIntOverflowTypes
  12488. }
  12489. if iNdEx >= l {
  12490. return io.ErrUnexpectedEOF
  12491. }
  12492. b := dAtA[iNdEx]
  12493. iNdEx++
  12494. m.Index |= uint32(b&0x7F) << shift
  12495. if b < 0x80 {
  12496. break
  12497. }
  12498. }
  12499. case 3:
  12500. if wireType != 2 {
  12501. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  12502. }
  12503. var byteLen int
  12504. for shift := uint(0); ; shift += 7 {
  12505. if shift >= 64 {
  12506. return ErrIntOverflowTypes
  12507. }
  12508. if iNdEx >= l {
  12509. return io.ErrUnexpectedEOF
  12510. }
  12511. b := dAtA[iNdEx]
  12512. iNdEx++
  12513. byteLen |= int(b&0x7F) << shift
  12514. if b < 0x80 {
  12515. break
  12516. }
  12517. }
  12518. if byteLen < 0 {
  12519. return ErrInvalidLengthTypes
  12520. }
  12521. postIndex := iNdEx + byteLen
  12522. if postIndex < 0 {
  12523. return ErrInvalidLengthTypes
  12524. }
  12525. if postIndex > l {
  12526. return io.ErrUnexpectedEOF
  12527. }
  12528. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  12529. if m.Tx == nil {
  12530. m.Tx = []byte{}
  12531. }
  12532. iNdEx = postIndex
  12533. case 4:
  12534. if wireType != 2 {
  12535. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12536. }
  12537. var msglen int
  12538. for shift := uint(0); ; shift += 7 {
  12539. if shift >= 64 {
  12540. return ErrIntOverflowTypes
  12541. }
  12542. if iNdEx >= l {
  12543. return io.ErrUnexpectedEOF
  12544. }
  12545. b := dAtA[iNdEx]
  12546. iNdEx++
  12547. msglen |= int(b&0x7F) << shift
  12548. if b < 0x80 {
  12549. break
  12550. }
  12551. }
  12552. if msglen < 0 {
  12553. return ErrInvalidLengthTypes
  12554. }
  12555. postIndex := iNdEx + msglen
  12556. if postIndex < 0 {
  12557. return ErrInvalidLengthTypes
  12558. }
  12559. if postIndex > l {
  12560. return io.ErrUnexpectedEOF
  12561. }
  12562. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12563. return err
  12564. }
  12565. iNdEx = postIndex
  12566. default:
  12567. iNdEx = preIndex
  12568. skippy, err := skipTypes(dAtA[iNdEx:])
  12569. if err != nil {
  12570. return err
  12571. }
  12572. if skippy < 0 {
  12573. return ErrInvalidLengthTypes
  12574. }
  12575. if (iNdEx + skippy) < 0 {
  12576. return ErrInvalidLengthTypes
  12577. }
  12578. if (iNdEx + skippy) > l {
  12579. return io.ErrUnexpectedEOF
  12580. }
  12581. iNdEx += skippy
  12582. }
  12583. }
  12584. if iNdEx > l {
  12585. return io.ErrUnexpectedEOF
  12586. }
  12587. return nil
  12588. }
  12589. func (m *Validator) Unmarshal(dAtA []byte) error {
  12590. l := len(dAtA)
  12591. iNdEx := 0
  12592. for iNdEx < l {
  12593. preIndex := iNdEx
  12594. var wire uint64
  12595. for shift := uint(0); ; shift += 7 {
  12596. if shift >= 64 {
  12597. return ErrIntOverflowTypes
  12598. }
  12599. if iNdEx >= l {
  12600. return io.ErrUnexpectedEOF
  12601. }
  12602. b := dAtA[iNdEx]
  12603. iNdEx++
  12604. wire |= uint64(b&0x7F) << shift
  12605. if b < 0x80 {
  12606. break
  12607. }
  12608. }
  12609. fieldNum := int32(wire >> 3)
  12610. wireType := int(wire & 0x7)
  12611. if wireType == 4 {
  12612. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  12613. }
  12614. if fieldNum <= 0 {
  12615. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  12616. }
  12617. switch fieldNum {
  12618. case 1:
  12619. if wireType != 2 {
  12620. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  12621. }
  12622. var byteLen int
  12623. for shift := uint(0); ; shift += 7 {
  12624. if shift >= 64 {
  12625. return ErrIntOverflowTypes
  12626. }
  12627. if iNdEx >= l {
  12628. return io.ErrUnexpectedEOF
  12629. }
  12630. b := dAtA[iNdEx]
  12631. iNdEx++
  12632. byteLen |= int(b&0x7F) << shift
  12633. if b < 0x80 {
  12634. break
  12635. }
  12636. }
  12637. if byteLen < 0 {
  12638. return ErrInvalidLengthTypes
  12639. }
  12640. postIndex := iNdEx + byteLen
  12641. if postIndex < 0 {
  12642. return ErrInvalidLengthTypes
  12643. }
  12644. if postIndex > l {
  12645. return io.ErrUnexpectedEOF
  12646. }
  12647. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  12648. if m.Address == nil {
  12649. m.Address = []byte{}
  12650. }
  12651. iNdEx = postIndex
  12652. case 3:
  12653. if wireType != 0 {
  12654. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12655. }
  12656. m.Power = 0
  12657. for shift := uint(0); ; shift += 7 {
  12658. if shift >= 64 {
  12659. return ErrIntOverflowTypes
  12660. }
  12661. if iNdEx >= l {
  12662. return io.ErrUnexpectedEOF
  12663. }
  12664. b := dAtA[iNdEx]
  12665. iNdEx++
  12666. m.Power |= int64(b&0x7F) << shift
  12667. if b < 0x80 {
  12668. break
  12669. }
  12670. }
  12671. default:
  12672. iNdEx = preIndex
  12673. skippy, err := skipTypes(dAtA[iNdEx:])
  12674. if err != nil {
  12675. return err
  12676. }
  12677. if skippy < 0 {
  12678. return ErrInvalidLengthTypes
  12679. }
  12680. if (iNdEx + skippy) < 0 {
  12681. return ErrInvalidLengthTypes
  12682. }
  12683. if (iNdEx + skippy) > l {
  12684. return io.ErrUnexpectedEOF
  12685. }
  12686. iNdEx += skippy
  12687. }
  12688. }
  12689. if iNdEx > l {
  12690. return io.ErrUnexpectedEOF
  12691. }
  12692. return nil
  12693. }
  12694. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12695. l := len(dAtA)
  12696. iNdEx := 0
  12697. for iNdEx < l {
  12698. preIndex := iNdEx
  12699. var wire uint64
  12700. for shift := uint(0); ; shift += 7 {
  12701. if shift >= 64 {
  12702. return ErrIntOverflowTypes
  12703. }
  12704. if iNdEx >= l {
  12705. return io.ErrUnexpectedEOF
  12706. }
  12707. b := dAtA[iNdEx]
  12708. iNdEx++
  12709. wire |= uint64(b&0x7F) << shift
  12710. if b < 0x80 {
  12711. break
  12712. }
  12713. }
  12714. fieldNum := int32(wire >> 3)
  12715. wireType := int(wire & 0x7)
  12716. if wireType == 4 {
  12717. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12718. }
  12719. if fieldNum <= 0 {
  12720. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12721. }
  12722. switch fieldNum {
  12723. case 1:
  12724. if wireType != 2 {
  12725. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12726. }
  12727. var msglen int
  12728. for shift := uint(0); ; shift += 7 {
  12729. if shift >= 64 {
  12730. return ErrIntOverflowTypes
  12731. }
  12732. if iNdEx >= l {
  12733. return io.ErrUnexpectedEOF
  12734. }
  12735. b := dAtA[iNdEx]
  12736. iNdEx++
  12737. msglen |= int(b&0x7F) << shift
  12738. if b < 0x80 {
  12739. break
  12740. }
  12741. }
  12742. if msglen < 0 {
  12743. return ErrInvalidLengthTypes
  12744. }
  12745. postIndex := iNdEx + msglen
  12746. if postIndex < 0 {
  12747. return ErrInvalidLengthTypes
  12748. }
  12749. if postIndex > l {
  12750. return io.ErrUnexpectedEOF
  12751. }
  12752. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12753. return err
  12754. }
  12755. iNdEx = postIndex
  12756. case 2:
  12757. if wireType != 0 {
  12758. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12759. }
  12760. m.Power = 0
  12761. for shift := uint(0); ; shift += 7 {
  12762. if shift >= 64 {
  12763. return ErrIntOverflowTypes
  12764. }
  12765. if iNdEx >= l {
  12766. return io.ErrUnexpectedEOF
  12767. }
  12768. b := dAtA[iNdEx]
  12769. iNdEx++
  12770. m.Power |= int64(b&0x7F) << shift
  12771. if b < 0x80 {
  12772. break
  12773. }
  12774. }
  12775. default:
  12776. iNdEx = preIndex
  12777. skippy, err := skipTypes(dAtA[iNdEx:])
  12778. if err != nil {
  12779. return err
  12780. }
  12781. if skippy < 0 {
  12782. return ErrInvalidLengthTypes
  12783. }
  12784. if (iNdEx + skippy) < 0 {
  12785. return ErrInvalidLengthTypes
  12786. }
  12787. if (iNdEx + skippy) > l {
  12788. return io.ErrUnexpectedEOF
  12789. }
  12790. iNdEx += skippy
  12791. }
  12792. }
  12793. if iNdEx > l {
  12794. return io.ErrUnexpectedEOF
  12795. }
  12796. return nil
  12797. }
  12798. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12799. l := len(dAtA)
  12800. iNdEx := 0
  12801. for iNdEx < l {
  12802. preIndex := iNdEx
  12803. var wire uint64
  12804. for shift := uint(0); ; shift += 7 {
  12805. if shift >= 64 {
  12806. return ErrIntOverflowTypes
  12807. }
  12808. if iNdEx >= l {
  12809. return io.ErrUnexpectedEOF
  12810. }
  12811. b := dAtA[iNdEx]
  12812. iNdEx++
  12813. wire |= uint64(b&0x7F) << shift
  12814. if b < 0x80 {
  12815. break
  12816. }
  12817. }
  12818. fieldNum := int32(wire >> 3)
  12819. wireType := int(wire & 0x7)
  12820. if wireType == 4 {
  12821. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12822. }
  12823. if fieldNum <= 0 {
  12824. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12825. }
  12826. switch fieldNum {
  12827. case 1:
  12828. if wireType != 2 {
  12829. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12830. }
  12831. var msglen int
  12832. for shift := uint(0); ; shift += 7 {
  12833. if shift >= 64 {
  12834. return ErrIntOverflowTypes
  12835. }
  12836. if iNdEx >= l {
  12837. return io.ErrUnexpectedEOF
  12838. }
  12839. b := dAtA[iNdEx]
  12840. iNdEx++
  12841. msglen |= int(b&0x7F) << shift
  12842. if b < 0x80 {
  12843. break
  12844. }
  12845. }
  12846. if msglen < 0 {
  12847. return ErrInvalidLengthTypes
  12848. }
  12849. postIndex := iNdEx + msglen
  12850. if postIndex < 0 {
  12851. return ErrInvalidLengthTypes
  12852. }
  12853. if postIndex > l {
  12854. return io.ErrUnexpectedEOF
  12855. }
  12856. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12857. return err
  12858. }
  12859. iNdEx = postIndex
  12860. case 2:
  12861. if wireType != 0 {
  12862. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12863. }
  12864. var v int
  12865. for shift := uint(0); ; shift += 7 {
  12866. if shift >= 64 {
  12867. return ErrIntOverflowTypes
  12868. }
  12869. if iNdEx >= l {
  12870. return io.ErrUnexpectedEOF
  12871. }
  12872. b := dAtA[iNdEx]
  12873. iNdEx++
  12874. v |= int(b&0x7F) << shift
  12875. if b < 0x80 {
  12876. break
  12877. }
  12878. }
  12879. m.SignedLastBlock = bool(v != 0)
  12880. default:
  12881. iNdEx = preIndex
  12882. skippy, err := skipTypes(dAtA[iNdEx:])
  12883. if err != nil {
  12884. return err
  12885. }
  12886. if skippy < 0 {
  12887. return ErrInvalidLengthTypes
  12888. }
  12889. if (iNdEx + skippy) < 0 {
  12890. return ErrInvalidLengthTypes
  12891. }
  12892. if (iNdEx + skippy) > l {
  12893. return io.ErrUnexpectedEOF
  12894. }
  12895. iNdEx += skippy
  12896. }
  12897. }
  12898. if iNdEx > l {
  12899. return io.ErrUnexpectedEOF
  12900. }
  12901. return nil
  12902. }
  12903. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12904. l := len(dAtA)
  12905. iNdEx := 0
  12906. for iNdEx < l {
  12907. preIndex := iNdEx
  12908. var wire uint64
  12909. for shift := uint(0); ; shift += 7 {
  12910. if shift >= 64 {
  12911. return ErrIntOverflowTypes
  12912. }
  12913. if iNdEx >= l {
  12914. return io.ErrUnexpectedEOF
  12915. }
  12916. b := dAtA[iNdEx]
  12917. iNdEx++
  12918. wire |= uint64(b&0x7F) << shift
  12919. if b < 0x80 {
  12920. break
  12921. }
  12922. }
  12923. fieldNum := int32(wire >> 3)
  12924. wireType := int(wire & 0x7)
  12925. if wireType == 4 {
  12926. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12927. }
  12928. if fieldNum <= 0 {
  12929. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12930. }
  12931. switch fieldNum {
  12932. case 1:
  12933. if wireType != 0 {
  12934. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12935. }
  12936. m.Type = 0
  12937. for shift := uint(0); ; shift += 7 {
  12938. if shift >= 64 {
  12939. return ErrIntOverflowTypes
  12940. }
  12941. if iNdEx >= l {
  12942. return io.ErrUnexpectedEOF
  12943. }
  12944. b := dAtA[iNdEx]
  12945. iNdEx++
  12946. m.Type |= EvidenceType(b&0x7F) << shift
  12947. if b < 0x80 {
  12948. break
  12949. }
  12950. }
  12951. case 2:
  12952. if wireType != 2 {
  12953. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12954. }
  12955. var msglen int
  12956. for shift := uint(0); ; shift += 7 {
  12957. if shift >= 64 {
  12958. return ErrIntOverflowTypes
  12959. }
  12960. if iNdEx >= l {
  12961. return io.ErrUnexpectedEOF
  12962. }
  12963. b := dAtA[iNdEx]
  12964. iNdEx++
  12965. msglen |= int(b&0x7F) << shift
  12966. if b < 0x80 {
  12967. break
  12968. }
  12969. }
  12970. if msglen < 0 {
  12971. return ErrInvalidLengthTypes
  12972. }
  12973. postIndex := iNdEx + msglen
  12974. if postIndex < 0 {
  12975. return ErrInvalidLengthTypes
  12976. }
  12977. if postIndex > l {
  12978. return io.ErrUnexpectedEOF
  12979. }
  12980. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12981. return err
  12982. }
  12983. iNdEx = postIndex
  12984. case 3:
  12985. if wireType != 0 {
  12986. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12987. }
  12988. m.Height = 0
  12989. for shift := uint(0); ; shift += 7 {
  12990. if shift >= 64 {
  12991. return ErrIntOverflowTypes
  12992. }
  12993. if iNdEx >= l {
  12994. return io.ErrUnexpectedEOF
  12995. }
  12996. b := dAtA[iNdEx]
  12997. iNdEx++
  12998. m.Height |= int64(b&0x7F) << shift
  12999. if b < 0x80 {
  13000. break
  13001. }
  13002. }
  13003. case 4:
  13004. if wireType != 2 {
  13005. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  13006. }
  13007. var msglen int
  13008. for shift := uint(0); ; shift += 7 {
  13009. if shift >= 64 {
  13010. return ErrIntOverflowTypes
  13011. }
  13012. if iNdEx >= l {
  13013. return io.ErrUnexpectedEOF
  13014. }
  13015. b := dAtA[iNdEx]
  13016. iNdEx++
  13017. msglen |= int(b&0x7F) << shift
  13018. if b < 0x80 {
  13019. break
  13020. }
  13021. }
  13022. if msglen < 0 {
  13023. return ErrInvalidLengthTypes
  13024. }
  13025. postIndex := iNdEx + msglen
  13026. if postIndex < 0 {
  13027. return ErrInvalidLengthTypes
  13028. }
  13029. if postIndex > l {
  13030. return io.ErrUnexpectedEOF
  13031. }
  13032. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  13033. return err
  13034. }
  13035. iNdEx = postIndex
  13036. case 5:
  13037. if wireType != 0 {
  13038. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  13039. }
  13040. m.TotalVotingPower = 0
  13041. for shift := uint(0); ; shift += 7 {
  13042. if shift >= 64 {
  13043. return ErrIntOverflowTypes
  13044. }
  13045. if iNdEx >= l {
  13046. return io.ErrUnexpectedEOF
  13047. }
  13048. b := dAtA[iNdEx]
  13049. iNdEx++
  13050. m.TotalVotingPower |= int64(b&0x7F) << shift
  13051. if b < 0x80 {
  13052. break
  13053. }
  13054. }
  13055. default:
  13056. iNdEx = preIndex
  13057. skippy, err := skipTypes(dAtA[iNdEx:])
  13058. if err != nil {
  13059. return err
  13060. }
  13061. if skippy < 0 {
  13062. return ErrInvalidLengthTypes
  13063. }
  13064. if (iNdEx + skippy) < 0 {
  13065. return ErrInvalidLengthTypes
  13066. }
  13067. if (iNdEx + skippy) > l {
  13068. return io.ErrUnexpectedEOF
  13069. }
  13070. iNdEx += skippy
  13071. }
  13072. }
  13073. if iNdEx > l {
  13074. return io.ErrUnexpectedEOF
  13075. }
  13076. return nil
  13077. }
  13078. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  13079. l := len(dAtA)
  13080. iNdEx := 0
  13081. for iNdEx < l {
  13082. preIndex := iNdEx
  13083. var wire uint64
  13084. for shift := uint(0); ; shift += 7 {
  13085. if shift >= 64 {
  13086. return ErrIntOverflowTypes
  13087. }
  13088. if iNdEx >= l {
  13089. return io.ErrUnexpectedEOF
  13090. }
  13091. b := dAtA[iNdEx]
  13092. iNdEx++
  13093. wire |= uint64(b&0x7F) << shift
  13094. if b < 0x80 {
  13095. break
  13096. }
  13097. }
  13098. fieldNum := int32(wire >> 3)
  13099. wireType := int(wire & 0x7)
  13100. if wireType == 4 {
  13101. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  13102. }
  13103. if fieldNum <= 0 {
  13104. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  13105. }
  13106. switch fieldNum {
  13107. case 1:
  13108. if wireType != 0 {
  13109. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  13110. }
  13111. m.Height = 0
  13112. for shift := uint(0); ; shift += 7 {
  13113. if shift >= 64 {
  13114. return ErrIntOverflowTypes
  13115. }
  13116. if iNdEx >= l {
  13117. return io.ErrUnexpectedEOF
  13118. }
  13119. b := dAtA[iNdEx]
  13120. iNdEx++
  13121. m.Height |= uint64(b&0x7F) << shift
  13122. if b < 0x80 {
  13123. break
  13124. }
  13125. }
  13126. case 2:
  13127. if wireType != 0 {
  13128. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  13129. }
  13130. m.Format = 0
  13131. for shift := uint(0); ; shift += 7 {
  13132. if shift >= 64 {
  13133. return ErrIntOverflowTypes
  13134. }
  13135. if iNdEx >= l {
  13136. return io.ErrUnexpectedEOF
  13137. }
  13138. b := dAtA[iNdEx]
  13139. iNdEx++
  13140. m.Format |= uint32(b&0x7F) << shift
  13141. if b < 0x80 {
  13142. break
  13143. }
  13144. }
  13145. case 3:
  13146. if wireType != 0 {
  13147. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  13148. }
  13149. m.Chunks = 0
  13150. for shift := uint(0); ; shift += 7 {
  13151. if shift >= 64 {
  13152. return ErrIntOverflowTypes
  13153. }
  13154. if iNdEx >= l {
  13155. return io.ErrUnexpectedEOF
  13156. }
  13157. b := dAtA[iNdEx]
  13158. iNdEx++
  13159. m.Chunks |= uint32(b&0x7F) << shift
  13160. if b < 0x80 {
  13161. break
  13162. }
  13163. }
  13164. case 4:
  13165. if wireType != 2 {
  13166. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  13167. }
  13168. var byteLen int
  13169. for shift := uint(0); ; shift += 7 {
  13170. if shift >= 64 {
  13171. return ErrIntOverflowTypes
  13172. }
  13173. if iNdEx >= l {
  13174. return io.ErrUnexpectedEOF
  13175. }
  13176. b := dAtA[iNdEx]
  13177. iNdEx++
  13178. byteLen |= int(b&0x7F) << shift
  13179. if b < 0x80 {
  13180. break
  13181. }
  13182. }
  13183. if byteLen < 0 {
  13184. return ErrInvalidLengthTypes
  13185. }
  13186. postIndex := iNdEx + byteLen
  13187. if postIndex < 0 {
  13188. return ErrInvalidLengthTypes
  13189. }
  13190. if postIndex > l {
  13191. return io.ErrUnexpectedEOF
  13192. }
  13193. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  13194. if m.Hash == nil {
  13195. m.Hash = []byte{}
  13196. }
  13197. iNdEx = postIndex
  13198. case 5:
  13199. if wireType != 2 {
  13200. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  13201. }
  13202. var byteLen int
  13203. for shift := uint(0); ; shift += 7 {
  13204. if shift >= 64 {
  13205. return ErrIntOverflowTypes
  13206. }
  13207. if iNdEx >= l {
  13208. return io.ErrUnexpectedEOF
  13209. }
  13210. b := dAtA[iNdEx]
  13211. iNdEx++
  13212. byteLen |= int(b&0x7F) << shift
  13213. if b < 0x80 {
  13214. break
  13215. }
  13216. }
  13217. if byteLen < 0 {
  13218. return ErrInvalidLengthTypes
  13219. }
  13220. postIndex := iNdEx + byteLen
  13221. if postIndex < 0 {
  13222. return ErrInvalidLengthTypes
  13223. }
  13224. if postIndex > l {
  13225. return io.ErrUnexpectedEOF
  13226. }
  13227. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  13228. if m.Metadata == nil {
  13229. m.Metadata = []byte{}
  13230. }
  13231. iNdEx = postIndex
  13232. default:
  13233. iNdEx = preIndex
  13234. skippy, err := skipTypes(dAtA[iNdEx:])
  13235. if err != nil {
  13236. return err
  13237. }
  13238. if skippy < 0 {
  13239. return ErrInvalidLengthTypes
  13240. }
  13241. if (iNdEx + skippy) < 0 {
  13242. return ErrInvalidLengthTypes
  13243. }
  13244. if (iNdEx + skippy) > l {
  13245. return io.ErrUnexpectedEOF
  13246. }
  13247. iNdEx += skippy
  13248. }
  13249. }
  13250. if iNdEx > l {
  13251. return io.ErrUnexpectedEOF
  13252. }
  13253. return nil
  13254. }
  13255. func skipTypes(dAtA []byte) (n int, err error) {
  13256. l := len(dAtA)
  13257. iNdEx := 0
  13258. depth := 0
  13259. for iNdEx < l {
  13260. var wire uint64
  13261. for shift := uint(0); ; shift += 7 {
  13262. if shift >= 64 {
  13263. return 0, ErrIntOverflowTypes
  13264. }
  13265. if iNdEx >= l {
  13266. return 0, io.ErrUnexpectedEOF
  13267. }
  13268. b := dAtA[iNdEx]
  13269. iNdEx++
  13270. wire |= (uint64(b) & 0x7F) << shift
  13271. if b < 0x80 {
  13272. break
  13273. }
  13274. }
  13275. wireType := int(wire & 0x7)
  13276. switch wireType {
  13277. case 0:
  13278. for shift := uint(0); ; shift += 7 {
  13279. if shift >= 64 {
  13280. return 0, ErrIntOverflowTypes
  13281. }
  13282. if iNdEx >= l {
  13283. return 0, io.ErrUnexpectedEOF
  13284. }
  13285. iNdEx++
  13286. if dAtA[iNdEx-1] < 0x80 {
  13287. break
  13288. }
  13289. }
  13290. case 1:
  13291. iNdEx += 8
  13292. case 2:
  13293. var length int
  13294. for shift := uint(0); ; shift += 7 {
  13295. if shift >= 64 {
  13296. return 0, ErrIntOverflowTypes
  13297. }
  13298. if iNdEx >= l {
  13299. return 0, io.ErrUnexpectedEOF
  13300. }
  13301. b := dAtA[iNdEx]
  13302. iNdEx++
  13303. length |= (int(b) & 0x7F) << shift
  13304. if b < 0x80 {
  13305. break
  13306. }
  13307. }
  13308. if length < 0 {
  13309. return 0, ErrInvalidLengthTypes
  13310. }
  13311. iNdEx += length
  13312. case 3:
  13313. depth++
  13314. case 4:
  13315. if depth == 0 {
  13316. return 0, ErrUnexpectedEndOfGroupTypes
  13317. }
  13318. depth--
  13319. case 5:
  13320. iNdEx += 4
  13321. default:
  13322. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  13323. }
  13324. if iNdEx < 0 {
  13325. return 0, ErrInvalidLengthTypes
  13326. }
  13327. if depth == 0 {
  13328. return iNdEx, nil
  13329. }
  13330. }
  13331. return 0, io.ErrUnexpectedEOF
  13332. }
  13333. var (
  13334. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  13335. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  13336. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  13337. )