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.

13870 lines
330 KiB

7 years ago
7 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
6 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in 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. }
  431. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  432. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  433. func (*RequestInfo) ProtoMessage() {}
  434. func (*RequestInfo) Descriptor() ([]byte, []int) {
  435. return fileDescriptor_252557cfdd89a31a, []int{3}
  436. }
  437. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  438. return m.Unmarshal(b)
  439. }
  440. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  441. if deterministic {
  442. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  443. } else {
  444. b = b[:cap(b)]
  445. n, err := m.MarshalToSizedBuffer(b)
  446. if err != nil {
  447. return nil, err
  448. }
  449. return b[:n], nil
  450. }
  451. }
  452. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  453. xxx_messageInfo_RequestInfo.Merge(m, src)
  454. }
  455. func (m *RequestInfo) XXX_Size() int {
  456. return m.Size()
  457. }
  458. func (m *RequestInfo) XXX_DiscardUnknown() {
  459. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  460. }
  461. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  462. func (m *RequestInfo) GetVersion() string {
  463. if m != nil {
  464. return m.Version
  465. }
  466. return ""
  467. }
  468. func (m *RequestInfo) GetBlockVersion() uint64 {
  469. if m != nil {
  470. return m.BlockVersion
  471. }
  472. return 0
  473. }
  474. func (m *RequestInfo) GetP2PVersion() uint64 {
  475. if m != nil {
  476. return m.P2PVersion
  477. }
  478. return 0
  479. }
  480. type RequestInitChain struct {
  481. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  482. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  483. ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  484. Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
  485. AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"`
  486. InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
  487. }
  488. func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
  489. func (m *RequestInitChain) String() string { return proto.CompactTextString(m) }
  490. func (*RequestInitChain) ProtoMessage() {}
  491. func (*RequestInitChain) Descriptor() ([]byte, []int) {
  492. return fileDescriptor_252557cfdd89a31a, []int{4}
  493. }
  494. func (m *RequestInitChain) XXX_Unmarshal(b []byte) error {
  495. return m.Unmarshal(b)
  496. }
  497. func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  498. if deterministic {
  499. return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic)
  500. } else {
  501. b = b[:cap(b)]
  502. n, err := m.MarshalToSizedBuffer(b)
  503. if err != nil {
  504. return nil, err
  505. }
  506. return b[:n], nil
  507. }
  508. }
  509. func (m *RequestInitChain) XXX_Merge(src proto.Message) {
  510. xxx_messageInfo_RequestInitChain.Merge(m, src)
  511. }
  512. func (m *RequestInitChain) XXX_Size() int {
  513. return m.Size()
  514. }
  515. func (m *RequestInitChain) XXX_DiscardUnknown() {
  516. xxx_messageInfo_RequestInitChain.DiscardUnknown(m)
  517. }
  518. var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo
  519. func (m *RequestInitChain) GetTime() time.Time {
  520. if m != nil {
  521. return m.Time
  522. }
  523. return time.Time{}
  524. }
  525. func (m *RequestInitChain) GetChainId() string {
  526. if m != nil {
  527. return m.ChainId
  528. }
  529. return ""
  530. }
  531. func (m *RequestInitChain) GetConsensusParams() *ConsensusParams {
  532. if m != nil {
  533. return m.ConsensusParams
  534. }
  535. return nil
  536. }
  537. func (m *RequestInitChain) GetValidators() []ValidatorUpdate {
  538. if m != nil {
  539. return m.Validators
  540. }
  541. return nil
  542. }
  543. func (m *RequestInitChain) GetAppStateBytes() []byte {
  544. if m != nil {
  545. return m.AppStateBytes
  546. }
  547. return nil
  548. }
  549. func (m *RequestInitChain) GetInitialHeight() int64 {
  550. if m != nil {
  551. return m.InitialHeight
  552. }
  553. return 0
  554. }
  555. type RequestQuery struct {
  556. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  557. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  558. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  559. Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"`
  560. }
  561. func (m *RequestQuery) Reset() { *m = RequestQuery{} }
  562. func (m *RequestQuery) String() string { return proto.CompactTextString(m) }
  563. func (*RequestQuery) ProtoMessage() {}
  564. func (*RequestQuery) Descriptor() ([]byte, []int) {
  565. return fileDescriptor_252557cfdd89a31a, []int{5}
  566. }
  567. func (m *RequestQuery) XXX_Unmarshal(b []byte) error {
  568. return m.Unmarshal(b)
  569. }
  570. func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  571. if deterministic {
  572. return xxx_messageInfo_RequestQuery.Marshal(b, m, deterministic)
  573. } else {
  574. b = b[:cap(b)]
  575. n, err := m.MarshalToSizedBuffer(b)
  576. if err != nil {
  577. return nil, err
  578. }
  579. return b[:n], nil
  580. }
  581. }
  582. func (m *RequestQuery) XXX_Merge(src proto.Message) {
  583. xxx_messageInfo_RequestQuery.Merge(m, src)
  584. }
  585. func (m *RequestQuery) XXX_Size() int {
  586. return m.Size()
  587. }
  588. func (m *RequestQuery) XXX_DiscardUnknown() {
  589. xxx_messageInfo_RequestQuery.DiscardUnknown(m)
  590. }
  591. var xxx_messageInfo_RequestQuery proto.InternalMessageInfo
  592. func (m *RequestQuery) GetData() []byte {
  593. if m != nil {
  594. return m.Data
  595. }
  596. return nil
  597. }
  598. func (m *RequestQuery) GetPath() string {
  599. if m != nil {
  600. return m.Path
  601. }
  602. return ""
  603. }
  604. func (m *RequestQuery) GetHeight() int64 {
  605. if m != nil {
  606. return m.Height
  607. }
  608. return 0
  609. }
  610. func (m *RequestQuery) GetProve() bool {
  611. if m != nil {
  612. return m.Prove
  613. }
  614. return false
  615. }
  616. type RequestBeginBlock struct {
  617. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  618. Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"`
  619. LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"`
  620. ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"`
  621. }
  622. func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
  623. func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) }
  624. func (*RequestBeginBlock) ProtoMessage() {}
  625. func (*RequestBeginBlock) Descriptor() ([]byte, []int) {
  626. return fileDescriptor_252557cfdd89a31a, []int{6}
  627. }
  628. func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error {
  629. return m.Unmarshal(b)
  630. }
  631. func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  632. if deterministic {
  633. return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic)
  634. } else {
  635. b = b[:cap(b)]
  636. n, err := m.MarshalToSizedBuffer(b)
  637. if err != nil {
  638. return nil, err
  639. }
  640. return b[:n], nil
  641. }
  642. }
  643. func (m *RequestBeginBlock) XXX_Merge(src proto.Message) {
  644. xxx_messageInfo_RequestBeginBlock.Merge(m, src)
  645. }
  646. func (m *RequestBeginBlock) XXX_Size() int {
  647. return m.Size()
  648. }
  649. func (m *RequestBeginBlock) XXX_DiscardUnknown() {
  650. xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m)
  651. }
  652. var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo
  653. func (m *RequestBeginBlock) GetHash() []byte {
  654. if m != nil {
  655. return m.Hash
  656. }
  657. return nil
  658. }
  659. func (m *RequestBeginBlock) GetHeader() types1.Header {
  660. if m != nil {
  661. return m.Header
  662. }
  663. return types1.Header{}
  664. }
  665. func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo {
  666. if m != nil {
  667. return m.LastCommitInfo
  668. }
  669. return LastCommitInfo{}
  670. }
  671. func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
  672. if m != nil {
  673. return m.ByzantineValidators
  674. }
  675. return nil
  676. }
  677. type RequestCheckTx struct {
  678. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  679. Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"`
  680. }
  681. func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} }
  682. func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) }
  683. func (*RequestCheckTx) ProtoMessage() {}
  684. func (*RequestCheckTx) Descriptor() ([]byte, []int) {
  685. return fileDescriptor_252557cfdd89a31a, []int{7}
  686. }
  687. func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error {
  688. return m.Unmarshal(b)
  689. }
  690. func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  691. if deterministic {
  692. return xxx_messageInfo_RequestCheckTx.Marshal(b, m, deterministic)
  693. } else {
  694. b = b[:cap(b)]
  695. n, err := m.MarshalToSizedBuffer(b)
  696. if err != nil {
  697. return nil, err
  698. }
  699. return b[:n], nil
  700. }
  701. }
  702. func (m *RequestCheckTx) XXX_Merge(src proto.Message) {
  703. xxx_messageInfo_RequestCheckTx.Merge(m, src)
  704. }
  705. func (m *RequestCheckTx) XXX_Size() int {
  706. return m.Size()
  707. }
  708. func (m *RequestCheckTx) XXX_DiscardUnknown() {
  709. xxx_messageInfo_RequestCheckTx.DiscardUnknown(m)
  710. }
  711. var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo
  712. func (m *RequestCheckTx) GetTx() []byte {
  713. if m != nil {
  714. return m.Tx
  715. }
  716. return nil
  717. }
  718. func (m *RequestCheckTx) GetType() CheckTxType {
  719. if m != nil {
  720. return m.Type
  721. }
  722. return CheckTxType_New
  723. }
  724. type RequestDeliverTx struct {
  725. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  726. }
  727. func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
  728. func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
  729. func (*RequestDeliverTx) ProtoMessage() {}
  730. func (*RequestDeliverTx) Descriptor() ([]byte, []int) {
  731. return fileDescriptor_252557cfdd89a31a, []int{8}
  732. }
  733. func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error {
  734. return m.Unmarshal(b)
  735. }
  736. func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  737. if deterministic {
  738. return xxx_messageInfo_RequestDeliverTx.Marshal(b, m, deterministic)
  739. } else {
  740. b = b[:cap(b)]
  741. n, err := m.MarshalToSizedBuffer(b)
  742. if err != nil {
  743. return nil, err
  744. }
  745. return b[:n], nil
  746. }
  747. }
  748. func (m *RequestDeliverTx) XXX_Merge(src proto.Message) {
  749. xxx_messageInfo_RequestDeliverTx.Merge(m, src)
  750. }
  751. func (m *RequestDeliverTx) XXX_Size() int {
  752. return m.Size()
  753. }
  754. func (m *RequestDeliverTx) XXX_DiscardUnknown() {
  755. xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m)
  756. }
  757. var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo
  758. func (m *RequestDeliverTx) GetTx() []byte {
  759. if m != nil {
  760. return m.Tx
  761. }
  762. return nil
  763. }
  764. type RequestEndBlock struct {
  765. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  766. }
  767. func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} }
  768. func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) }
  769. func (*RequestEndBlock) ProtoMessage() {}
  770. func (*RequestEndBlock) Descriptor() ([]byte, []int) {
  771. return fileDescriptor_252557cfdd89a31a, []int{9}
  772. }
  773. func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error {
  774. return m.Unmarshal(b)
  775. }
  776. func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  777. if deterministic {
  778. return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic)
  779. } else {
  780. b = b[:cap(b)]
  781. n, err := m.MarshalToSizedBuffer(b)
  782. if err != nil {
  783. return nil, err
  784. }
  785. return b[:n], nil
  786. }
  787. }
  788. func (m *RequestEndBlock) XXX_Merge(src proto.Message) {
  789. xxx_messageInfo_RequestEndBlock.Merge(m, src)
  790. }
  791. func (m *RequestEndBlock) XXX_Size() int {
  792. return m.Size()
  793. }
  794. func (m *RequestEndBlock) XXX_DiscardUnknown() {
  795. xxx_messageInfo_RequestEndBlock.DiscardUnknown(m)
  796. }
  797. var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo
  798. func (m *RequestEndBlock) GetHeight() int64 {
  799. if m != nil {
  800. return m.Height
  801. }
  802. return 0
  803. }
  804. type RequestCommit struct {
  805. }
  806. func (m *RequestCommit) Reset() { *m = RequestCommit{} }
  807. func (m *RequestCommit) String() string { return proto.CompactTextString(m) }
  808. func (*RequestCommit) ProtoMessage() {}
  809. func (*RequestCommit) Descriptor() ([]byte, []int) {
  810. return fileDescriptor_252557cfdd89a31a, []int{10}
  811. }
  812. func (m *RequestCommit) XXX_Unmarshal(b []byte) error {
  813. return m.Unmarshal(b)
  814. }
  815. func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  816. if deterministic {
  817. return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic)
  818. } else {
  819. b = b[:cap(b)]
  820. n, err := m.MarshalToSizedBuffer(b)
  821. if err != nil {
  822. return nil, err
  823. }
  824. return b[:n], nil
  825. }
  826. }
  827. func (m *RequestCommit) XXX_Merge(src proto.Message) {
  828. xxx_messageInfo_RequestCommit.Merge(m, src)
  829. }
  830. func (m *RequestCommit) XXX_Size() int {
  831. return m.Size()
  832. }
  833. func (m *RequestCommit) XXX_DiscardUnknown() {
  834. xxx_messageInfo_RequestCommit.DiscardUnknown(m)
  835. }
  836. var xxx_messageInfo_RequestCommit proto.InternalMessageInfo
  837. // lists available snapshots
  838. type RequestListSnapshots struct {
  839. }
  840. func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} }
  841. func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) }
  842. func (*RequestListSnapshots) ProtoMessage() {}
  843. func (*RequestListSnapshots) Descriptor() ([]byte, []int) {
  844. return fileDescriptor_252557cfdd89a31a, []int{11}
  845. }
  846. func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error {
  847. return m.Unmarshal(b)
  848. }
  849. func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  850. if deterministic {
  851. return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic)
  852. } else {
  853. b = b[:cap(b)]
  854. n, err := m.MarshalToSizedBuffer(b)
  855. if err != nil {
  856. return nil, err
  857. }
  858. return b[:n], nil
  859. }
  860. }
  861. func (m *RequestListSnapshots) XXX_Merge(src proto.Message) {
  862. xxx_messageInfo_RequestListSnapshots.Merge(m, src)
  863. }
  864. func (m *RequestListSnapshots) XXX_Size() int {
  865. return m.Size()
  866. }
  867. func (m *RequestListSnapshots) XXX_DiscardUnknown() {
  868. xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m)
  869. }
  870. var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo
  871. // offers a snapshot to the application
  872. type RequestOfferSnapshot struct {
  873. Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
  874. AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  875. }
  876. func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} }
  877. func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) }
  878. func (*RequestOfferSnapshot) ProtoMessage() {}
  879. func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) {
  880. return fileDescriptor_252557cfdd89a31a, []int{12}
  881. }
  882. func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error {
  883. return m.Unmarshal(b)
  884. }
  885. func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  886. if deterministic {
  887. return xxx_messageInfo_RequestOfferSnapshot.Marshal(b, m, deterministic)
  888. } else {
  889. b = b[:cap(b)]
  890. n, err := m.MarshalToSizedBuffer(b)
  891. if err != nil {
  892. return nil, err
  893. }
  894. return b[:n], nil
  895. }
  896. }
  897. func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) {
  898. xxx_messageInfo_RequestOfferSnapshot.Merge(m, src)
  899. }
  900. func (m *RequestOfferSnapshot) XXX_Size() int {
  901. return m.Size()
  902. }
  903. func (m *RequestOfferSnapshot) XXX_DiscardUnknown() {
  904. xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m)
  905. }
  906. var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo
  907. func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot {
  908. if m != nil {
  909. return m.Snapshot
  910. }
  911. return nil
  912. }
  913. func (m *RequestOfferSnapshot) GetAppHash() []byte {
  914. if m != nil {
  915. return m.AppHash
  916. }
  917. return nil
  918. }
  919. // loads a snapshot chunk
  920. type RequestLoadSnapshotChunk struct {
  921. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  922. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  923. Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
  924. }
  925. func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} }
  926. func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  927. func (*RequestLoadSnapshotChunk) ProtoMessage() {}
  928. func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  929. return fileDescriptor_252557cfdd89a31a, []int{13}
  930. }
  931. func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  932. return m.Unmarshal(b)
  933. }
  934. func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  935. if deterministic {
  936. return xxx_messageInfo_RequestLoadSnapshotChunk.Marshal(b, m, deterministic)
  937. } else {
  938. b = b[:cap(b)]
  939. n, err := m.MarshalToSizedBuffer(b)
  940. if err != nil {
  941. return nil, err
  942. }
  943. return b[:n], nil
  944. }
  945. }
  946. func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  947. xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src)
  948. }
  949. func (m *RequestLoadSnapshotChunk) XXX_Size() int {
  950. return m.Size()
  951. }
  952. func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() {
  953. xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m)
  954. }
  955. var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo
  956. func (m *RequestLoadSnapshotChunk) GetHeight() uint64 {
  957. if m != nil {
  958. return m.Height
  959. }
  960. return 0
  961. }
  962. func (m *RequestLoadSnapshotChunk) GetFormat() uint32 {
  963. if m != nil {
  964. return m.Format
  965. }
  966. return 0
  967. }
  968. func (m *RequestLoadSnapshotChunk) GetChunk() uint32 {
  969. if m != nil {
  970. return m.Chunk
  971. }
  972. return 0
  973. }
  974. // Applies a snapshot chunk
  975. type RequestApplySnapshotChunk struct {
  976. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
  977. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
  978. Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
  979. }
  980. func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} }
  981. func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  982. func (*RequestApplySnapshotChunk) ProtoMessage() {}
  983. func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) {
  984. return fileDescriptor_252557cfdd89a31a, []int{14}
  985. }
  986. func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  987. return m.Unmarshal(b)
  988. }
  989. func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  990. if deterministic {
  991. return xxx_messageInfo_RequestApplySnapshotChunk.Marshal(b, m, deterministic)
  992. } else {
  993. b = b[:cap(b)]
  994. n, err := m.MarshalToSizedBuffer(b)
  995. if err != nil {
  996. return nil, err
  997. }
  998. return b[:n], nil
  999. }
  1000. }
  1001. func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) {
  1002. xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src)
  1003. }
  1004. func (m *RequestApplySnapshotChunk) XXX_Size() int {
  1005. return m.Size()
  1006. }
  1007. func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() {
  1008. xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m)
  1009. }
  1010. var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo
  1011. func (m *RequestApplySnapshotChunk) GetIndex() uint32 {
  1012. if m != nil {
  1013. return m.Index
  1014. }
  1015. return 0
  1016. }
  1017. func (m *RequestApplySnapshotChunk) GetChunk() []byte {
  1018. if m != nil {
  1019. return m.Chunk
  1020. }
  1021. return nil
  1022. }
  1023. func (m *RequestApplySnapshotChunk) GetSender() string {
  1024. if m != nil {
  1025. return m.Sender
  1026. }
  1027. return ""
  1028. }
  1029. type Response struct {
  1030. // Types that are valid to be assigned to Value:
  1031. // *Response_Exception
  1032. // *Response_Echo
  1033. // *Response_Flush
  1034. // *Response_Info
  1035. // *Response_InitChain
  1036. // *Response_Query
  1037. // *Response_BeginBlock
  1038. // *Response_CheckTx
  1039. // *Response_DeliverTx
  1040. // *Response_EndBlock
  1041. // *Response_Commit
  1042. // *Response_ListSnapshots
  1043. // *Response_OfferSnapshot
  1044. // *Response_LoadSnapshotChunk
  1045. // *Response_ApplySnapshotChunk
  1046. Value isResponse_Value `protobuf_oneof:"value"`
  1047. }
  1048. func (m *Response) Reset() { *m = Response{} }
  1049. func (m *Response) String() string { return proto.CompactTextString(m) }
  1050. func (*Response) ProtoMessage() {}
  1051. func (*Response) Descriptor() ([]byte, []int) {
  1052. return fileDescriptor_252557cfdd89a31a, []int{15}
  1053. }
  1054. func (m *Response) XXX_Unmarshal(b []byte) error {
  1055. return m.Unmarshal(b)
  1056. }
  1057. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1058. if deterministic {
  1059. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  1060. } else {
  1061. b = b[:cap(b)]
  1062. n, err := m.MarshalToSizedBuffer(b)
  1063. if err != nil {
  1064. return nil, err
  1065. }
  1066. return b[:n], nil
  1067. }
  1068. }
  1069. func (m *Response) XXX_Merge(src proto.Message) {
  1070. xxx_messageInfo_Response.Merge(m, src)
  1071. }
  1072. func (m *Response) XXX_Size() int {
  1073. return m.Size()
  1074. }
  1075. func (m *Response) XXX_DiscardUnknown() {
  1076. xxx_messageInfo_Response.DiscardUnknown(m)
  1077. }
  1078. var xxx_messageInfo_Response proto.InternalMessageInfo
  1079. type isResponse_Value interface {
  1080. isResponse_Value()
  1081. MarshalTo([]byte) (int, error)
  1082. Size() int
  1083. }
  1084. type Response_Exception struct {
  1085. Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"`
  1086. }
  1087. type Response_Echo struct {
  1088. Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  1089. }
  1090. type Response_Flush struct {
  1091. Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  1092. }
  1093. type Response_Info struct {
  1094. Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"`
  1095. }
  1096. type Response_InitChain struct {
  1097. InitChain *ResponseInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  1098. }
  1099. type Response_Query struct {
  1100. Query *ResponseQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
  1101. }
  1102. type Response_BeginBlock struct {
  1103. BeginBlock *ResponseBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  1104. }
  1105. type Response_CheckTx struct {
  1106. CheckTx *ResponseCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  1107. }
  1108. type Response_DeliverTx struct {
  1109. DeliverTx *ResponseDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  1110. }
  1111. type Response_EndBlock struct {
  1112. EndBlock *ResponseEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  1113. }
  1114. type Response_Commit struct {
  1115. Commit *ResponseCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  1116. }
  1117. type Response_ListSnapshots struct {
  1118. ListSnapshots *ResponseListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  1119. }
  1120. type Response_OfferSnapshot struct {
  1121. OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  1122. }
  1123. type Response_LoadSnapshotChunk struct {
  1124. LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  1125. }
  1126. type Response_ApplySnapshotChunk struct {
  1127. ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  1128. }
  1129. func (*Response_Exception) isResponse_Value() {}
  1130. func (*Response_Echo) isResponse_Value() {}
  1131. func (*Response_Flush) isResponse_Value() {}
  1132. func (*Response_Info) isResponse_Value() {}
  1133. func (*Response_InitChain) isResponse_Value() {}
  1134. func (*Response_Query) isResponse_Value() {}
  1135. func (*Response_BeginBlock) isResponse_Value() {}
  1136. func (*Response_CheckTx) isResponse_Value() {}
  1137. func (*Response_DeliverTx) isResponse_Value() {}
  1138. func (*Response_EndBlock) isResponse_Value() {}
  1139. func (*Response_Commit) isResponse_Value() {}
  1140. func (*Response_ListSnapshots) isResponse_Value() {}
  1141. func (*Response_OfferSnapshot) isResponse_Value() {}
  1142. func (*Response_LoadSnapshotChunk) isResponse_Value() {}
  1143. func (*Response_ApplySnapshotChunk) isResponse_Value() {}
  1144. func (m *Response) GetValue() isResponse_Value {
  1145. if m != nil {
  1146. return m.Value
  1147. }
  1148. return nil
  1149. }
  1150. func (m *Response) GetException() *ResponseException {
  1151. if x, ok := m.GetValue().(*Response_Exception); ok {
  1152. return x.Exception
  1153. }
  1154. return nil
  1155. }
  1156. func (m *Response) GetEcho() *ResponseEcho {
  1157. if x, ok := m.GetValue().(*Response_Echo); ok {
  1158. return x.Echo
  1159. }
  1160. return nil
  1161. }
  1162. func (m *Response) GetFlush() *ResponseFlush {
  1163. if x, ok := m.GetValue().(*Response_Flush); ok {
  1164. return x.Flush
  1165. }
  1166. return nil
  1167. }
  1168. func (m *Response) GetInfo() *ResponseInfo {
  1169. if x, ok := m.GetValue().(*Response_Info); ok {
  1170. return x.Info
  1171. }
  1172. return nil
  1173. }
  1174. func (m *Response) GetInitChain() *ResponseInitChain {
  1175. if x, ok := m.GetValue().(*Response_InitChain); ok {
  1176. return x.InitChain
  1177. }
  1178. return nil
  1179. }
  1180. func (m *Response) GetQuery() *ResponseQuery {
  1181. if x, ok := m.GetValue().(*Response_Query); ok {
  1182. return x.Query
  1183. }
  1184. return nil
  1185. }
  1186. func (m *Response) GetBeginBlock() *ResponseBeginBlock {
  1187. if x, ok := m.GetValue().(*Response_BeginBlock); ok {
  1188. return x.BeginBlock
  1189. }
  1190. return nil
  1191. }
  1192. func (m *Response) GetCheckTx() *ResponseCheckTx {
  1193. if x, ok := m.GetValue().(*Response_CheckTx); ok {
  1194. return x.CheckTx
  1195. }
  1196. return nil
  1197. }
  1198. func (m *Response) GetDeliverTx() *ResponseDeliverTx {
  1199. if x, ok := m.GetValue().(*Response_DeliverTx); ok {
  1200. return x.DeliverTx
  1201. }
  1202. return nil
  1203. }
  1204. func (m *Response) GetEndBlock() *ResponseEndBlock {
  1205. if x, ok := m.GetValue().(*Response_EndBlock); ok {
  1206. return x.EndBlock
  1207. }
  1208. return nil
  1209. }
  1210. func (m *Response) GetCommit() *ResponseCommit {
  1211. if x, ok := m.GetValue().(*Response_Commit); ok {
  1212. return x.Commit
  1213. }
  1214. return nil
  1215. }
  1216. func (m *Response) GetListSnapshots() *ResponseListSnapshots {
  1217. if x, ok := m.GetValue().(*Response_ListSnapshots); ok {
  1218. return x.ListSnapshots
  1219. }
  1220. return nil
  1221. }
  1222. func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot {
  1223. if x, ok := m.GetValue().(*Response_OfferSnapshot); ok {
  1224. return x.OfferSnapshot
  1225. }
  1226. return nil
  1227. }
  1228. func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk {
  1229. if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok {
  1230. return x.LoadSnapshotChunk
  1231. }
  1232. return nil
  1233. }
  1234. func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk {
  1235. if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok {
  1236. return x.ApplySnapshotChunk
  1237. }
  1238. return nil
  1239. }
  1240. // XXX_OneofWrappers is for the internal use of the proto package.
  1241. func (*Response) XXX_OneofWrappers() []interface{} {
  1242. return []interface{}{
  1243. (*Response_Exception)(nil),
  1244. (*Response_Echo)(nil),
  1245. (*Response_Flush)(nil),
  1246. (*Response_Info)(nil),
  1247. (*Response_InitChain)(nil),
  1248. (*Response_Query)(nil),
  1249. (*Response_BeginBlock)(nil),
  1250. (*Response_CheckTx)(nil),
  1251. (*Response_DeliverTx)(nil),
  1252. (*Response_EndBlock)(nil),
  1253. (*Response_Commit)(nil),
  1254. (*Response_ListSnapshots)(nil),
  1255. (*Response_OfferSnapshot)(nil),
  1256. (*Response_LoadSnapshotChunk)(nil),
  1257. (*Response_ApplySnapshotChunk)(nil),
  1258. }
  1259. }
  1260. // nondeterministic
  1261. type ResponseException struct {
  1262. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
  1263. }
  1264. func (m *ResponseException) Reset() { *m = ResponseException{} }
  1265. func (m *ResponseException) String() string { return proto.CompactTextString(m) }
  1266. func (*ResponseException) ProtoMessage() {}
  1267. func (*ResponseException) Descriptor() ([]byte, []int) {
  1268. return fileDescriptor_252557cfdd89a31a, []int{16}
  1269. }
  1270. func (m *ResponseException) XXX_Unmarshal(b []byte) error {
  1271. return m.Unmarshal(b)
  1272. }
  1273. func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1274. if deterministic {
  1275. return xxx_messageInfo_ResponseException.Marshal(b, m, deterministic)
  1276. } else {
  1277. b = b[:cap(b)]
  1278. n, err := m.MarshalToSizedBuffer(b)
  1279. if err != nil {
  1280. return nil, err
  1281. }
  1282. return b[:n], nil
  1283. }
  1284. }
  1285. func (m *ResponseException) XXX_Merge(src proto.Message) {
  1286. xxx_messageInfo_ResponseException.Merge(m, src)
  1287. }
  1288. func (m *ResponseException) XXX_Size() int {
  1289. return m.Size()
  1290. }
  1291. func (m *ResponseException) XXX_DiscardUnknown() {
  1292. xxx_messageInfo_ResponseException.DiscardUnknown(m)
  1293. }
  1294. var xxx_messageInfo_ResponseException proto.InternalMessageInfo
  1295. func (m *ResponseException) GetError() string {
  1296. if m != nil {
  1297. return m.Error
  1298. }
  1299. return ""
  1300. }
  1301. type ResponseEcho struct {
  1302. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  1303. }
  1304. func (m *ResponseEcho) Reset() { *m = ResponseEcho{} }
  1305. func (m *ResponseEcho) String() string { return proto.CompactTextString(m) }
  1306. func (*ResponseEcho) ProtoMessage() {}
  1307. func (*ResponseEcho) Descriptor() ([]byte, []int) {
  1308. return fileDescriptor_252557cfdd89a31a, []int{17}
  1309. }
  1310. func (m *ResponseEcho) XXX_Unmarshal(b []byte) error {
  1311. return m.Unmarshal(b)
  1312. }
  1313. func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1314. if deterministic {
  1315. return xxx_messageInfo_ResponseEcho.Marshal(b, m, deterministic)
  1316. } else {
  1317. b = b[:cap(b)]
  1318. n, err := m.MarshalToSizedBuffer(b)
  1319. if err != nil {
  1320. return nil, err
  1321. }
  1322. return b[:n], nil
  1323. }
  1324. }
  1325. func (m *ResponseEcho) XXX_Merge(src proto.Message) {
  1326. xxx_messageInfo_ResponseEcho.Merge(m, src)
  1327. }
  1328. func (m *ResponseEcho) XXX_Size() int {
  1329. return m.Size()
  1330. }
  1331. func (m *ResponseEcho) XXX_DiscardUnknown() {
  1332. xxx_messageInfo_ResponseEcho.DiscardUnknown(m)
  1333. }
  1334. var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo
  1335. func (m *ResponseEcho) GetMessage() string {
  1336. if m != nil {
  1337. return m.Message
  1338. }
  1339. return ""
  1340. }
  1341. type ResponseFlush struct {
  1342. }
  1343. func (m *ResponseFlush) Reset() { *m = ResponseFlush{} }
  1344. func (m *ResponseFlush) String() string { return proto.CompactTextString(m) }
  1345. func (*ResponseFlush) ProtoMessage() {}
  1346. func (*ResponseFlush) Descriptor() ([]byte, []int) {
  1347. return fileDescriptor_252557cfdd89a31a, []int{18}
  1348. }
  1349. func (m *ResponseFlush) XXX_Unmarshal(b []byte) error {
  1350. return m.Unmarshal(b)
  1351. }
  1352. func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1353. if deterministic {
  1354. return xxx_messageInfo_ResponseFlush.Marshal(b, m, deterministic)
  1355. } else {
  1356. b = b[:cap(b)]
  1357. n, err := m.MarshalToSizedBuffer(b)
  1358. if err != nil {
  1359. return nil, err
  1360. }
  1361. return b[:n], nil
  1362. }
  1363. }
  1364. func (m *ResponseFlush) XXX_Merge(src proto.Message) {
  1365. xxx_messageInfo_ResponseFlush.Merge(m, src)
  1366. }
  1367. func (m *ResponseFlush) XXX_Size() int {
  1368. return m.Size()
  1369. }
  1370. func (m *ResponseFlush) XXX_DiscardUnknown() {
  1371. xxx_messageInfo_ResponseFlush.DiscardUnknown(m)
  1372. }
  1373. var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo
  1374. type ResponseInfo struct {
  1375. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  1376. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1377. AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  1378. LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  1379. LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"`
  1380. }
  1381. func (m *ResponseInfo) Reset() { *m = ResponseInfo{} }
  1382. func (m *ResponseInfo) String() string { return proto.CompactTextString(m) }
  1383. func (*ResponseInfo) ProtoMessage() {}
  1384. func (*ResponseInfo) Descriptor() ([]byte, []int) {
  1385. return fileDescriptor_252557cfdd89a31a, []int{19}
  1386. }
  1387. func (m *ResponseInfo) XXX_Unmarshal(b []byte) error {
  1388. return m.Unmarshal(b)
  1389. }
  1390. func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1391. if deterministic {
  1392. return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic)
  1393. } else {
  1394. b = b[:cap(b)]
  1395. n, err := m.MarshalToSizedBuffer(b)
  1396. if err != nil {
  1397. return nil, err
  1398. }
  1399. return b[:n], nil
  1400. }
  1401. }
  1402. func (m *ResponseInfo) XXX_Merge(src proto.Message) {
  1403. xxx_messageInfo_ResponseInfo.Merge(m, src)
  1404. }
  1405. func (m *ResponseInfo) XXX_Size() int {
  1406. return m.Size()
  1407. }
  1408. func (m *ResponseInfo) XXX_DiscardUnknown() {
  1409. xxx_messageInfo_ResponseInfo.DiscardUnknown(m)
  1410. }
  1411. var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo
  1412. func (m *ResponseInfo) GetData() string {
  1413. if m != nil {
  1414. return m.Data
  1415. }
  1416. return ""
  1417. }
  1418. func (m *ResponseInfo) GetVersion() string {
  1419. if m != nil {
  1420. return m.Version
  1421. }
  1422. return ""
  1423. }
  1424. func (m *ResponseInfo) GetAppVersion() uint64 {
  1425. if m != nil {
  1426. return m.AppVersion
  1427. }
  1428. return 0
  1429. }
  1430. func (m *ResponseInfo) GetLastBlockHeight() int64 {
  1431. if m != nil {
  1432. return m.LastBlockHeight
  1433. }
  1434. return 0
  1435. }
  1436. func (m *ResponseInfo) GetLastBlockAppHash() []byte {
  1437. if m != nil {
  1438. return m.LastBlockAppHash
  1439. }
  1440. return nil
  1441. }
  1442. type ResponseInitChain struct {
  1443. ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  1444. Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
  1445. AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  1446. }
  1447. func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} }
  1448. func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) }
  1449. func (*ResponseInitChain) ProtoMessage() {}
  1450. func (*ResponseInitChain) Descriptor() ([]byte, []int) {
  1451. return fileDescriptor_252557cfdd89a31a, []int{20}
  1452. }
  1453. func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error {
  1454. return m.Unmarshal(b)
  1455. }
  1456. func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1457. if deterministic {
  1458. return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic)
  1459. } else {
  1460. b = b[:cap(b)]
  1461. n, err := m.MarshalToSizedBuffer(b)
  1462. if err != nil {
  1463. return nil, err
  1464. }
  1465. return b[:n], nil
  1466. }
  1467. }
  1468. func (m *ResponseInitChain) XXX_Merge(src proto.Message) {
  1469. xxx_messageInfo_ResponseInitChain.Merge(m, src)
  1470. }
  1471. func (m *ResponseInitChain) XXX_Size() int {
  1472. return m.Size()
  1473. }
  1474. func (m *ResponseInitChain) XXX_DiscardUnknown() {
  1475. xxx_messageInfo_ResponseInitChain.DiscardUnknown(m)
  1476. }
  1477. var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo
  1478. func (m *ResponseInitChain) GetConsensusParams() *ConsensusParams {
  1479. if m != nil {
  1480. return m.ConsensusParams
  1481. }
  1482. return nil
  1483. }
  1484. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1485. if m != nil {
  1486. return m.Validators
  1487. }
  1488. return nil
  1489. }
  1490. func (m *ResponseInitChain) GetAppHash() []byte {
  1491. if m != nil {
  1492. return m.AppHash
  1493. }
  1494. return nil
  1495. }
  1496. type ResponseQuery struct {
  1497. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1498. // bytes data = 2; // use "value" instead.
  1499. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1500. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1501. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1502. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1503. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1504. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1505. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1506. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1507. }
  1508. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1509. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1510. func (*ResponseQuery) ProtoMessage() {}
  1511. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1512. return fileDescriptor_252557cfdd89a31a, []int{21}
  1513. }
  1514. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1515. return m.Unmarshal(b)
  1516. }
  1517. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1518. if deterministic {
  1519. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1520. } else {
  1521. b = b[:cap(b)]
  1522. n, err := m.MarshalToSizedBuffer(b)
  1523. if err != nil {
  1524. return nil, err
  1525. }
  1526. return b[:n], nil
  1527. }
  1528. }
  1529. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1530. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1531. }
  1532. func (m *ResponseQuery) XXX_Size() int {
  1533. return m.Size()
  1534. }
  1535. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1536. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1537. }
  1538. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1539. func (m *ResponseQuery) GetCode() uint32 {
  1540. if m != nil {
  1541. return m.Code
  1542. }
  1543. return 0
  1544. }
  1545. func (m *ResponseQuery) GetLog() string {
  1546. if m != nil {
  1547. return m.Log
  1548. }
  1549. return ""
  1550. }
  1551. func (m *ResponseQuery) GetInfo() string {
  1552. if m != nil {
  1553. return m.Info
  1554. }
  1555. return ""
  1556. }
  1557. func (m *ResponseQuery) GetIndex() int64 {
  1558. if m != nil {
  1559. return m.Index
  1560. }
  1561. return 0
  1562. }
  1563. func (m *ResponseQuery) GetKey() []byte {
  1564. if m != nil {
  1565. return m.Key
  1566. }
  1567. return nil
  1568. }
  1569. func (m *ResponseQuery) GetValue() []byte {
  1570. if m != nil {
  1571. return m.Value
  1572. }
  1573. return nil
  1574. }
  1575. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1576. if m != nil {
  1577. return m.ProofOps
  1578. }
  1579. return nil
  1580. }
  1581. func (m *ResponseQuery) GetHeight() int64 {
  1582. if m != nil {
  1583. return m.Height
  1584. }
  1585. return 0
  1586. }
  1587. func (m *ResponseQuery) GetCodespace() string {
  1588. if m != nil {
  1589. return m.Codespace
  1590. }
  1591. return ""
  1592. }
  1593. type ResponseBeginBlock struct {
  1594. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1595. }
  1596. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1597. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1598. func (*ResponseBeginBlock) ProtoMessage() {}
  1599. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1600. return fileDescriptor_252557cfdd89a31a, []int{22}
  1601. }
  1602. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1603. return m.Unmarshal(b)
  1604. }
  1605. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1606. if deterministic {
  1607. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1608. } else {
  1609. b = b[:cap(b)]
  1610. n, err := m.MarshalToSizedBuffer(b)
  1611. if err != nil {
  1612. return nil, err
  1613. }
  1614. return b[:n], nil
  1615. }
  1616. }
  1617. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1618. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1619. }
  1620. func (m *ResponseBeginBlock) XXX_Size() int {
  1621. return m.Size()
  1622. }
  1623. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1624. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1625. }
  1626. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1627. func (m *ResponseBeginBlock) GetEvents() []Event {
  1628. if m != nil {
  1629. return m.Events
  1630. }
  1631. return nil
  1632. }
  1633. type ResponseCheckTx struct {
  1634. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1635. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1636. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1637. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1638. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1639. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1640. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1641. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1642. }
  1643. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1644. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1645. func (*ResponseCheckTx) ProtoMessage() {}
  1646. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1647. return fileDescriptor_252557cfdd89a31a, []int{23}
  1648. }
  1649. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1650. return m.Unmarshal(b)
  1651. }
  1652. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1653. if deterministic {
  1654. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1655. } else {
  1656. b = b[:cap(b)]
  1657. n, err := m.MarshalToSizedBuffer(b)
  1658. if err != nil {
  1659. return nil, err
  1660. }
  1661. return b[:n], nil
  1662. }
  1663. }
  1664. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1665. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1666. }
  1667. func (m *ResponseCheckTx) XXX_Size() int {
  1668. return m.Size()
  1669. }
  1670. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1671. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1672. }
  1673. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1674. func (m *ResponseCheckTx) GetCode() uint32 {
  1675. if m != nil {
  1676. return m.Code
  1677. }
  1678. return 0
  1679. }
  1680. func (m *ResponseCheckTx) GetData() []byte {
  1681. if m != nil {
  1682. return m.Data
  1683. }
  1684. return nil
  1685. }
  1686. func (m *ResponseCheckTx) GetLog() string {
  1687. if m != nil {
  1688. return m.Log
  1689. }
  1690. return ""
  1691. }
  1692. func (m *ResponseCheckTx) GetInfo() string {
  1693. if m != nil {
  1694. return m.Info
  1695. }
  1696. return ""
  1697. }
  1698. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1699. if m != nil {
  1700. return m.GasWanted
  1701. }
  1702. return 0
  1703. }
  1704. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1705. if m != nil {
  1706. return m.GasUsed
  1707. }
  1708. return 0
  1709. }
  1710. func (m *ResponseCheckTx) GetEvents() []Event {
  1711. if m != nil {
  1712. return m.Events
  1713. }
  1714. return nil
  1715. }
  1716. func (m *ResponseCheckTx) GetCodespace() string {
  1717. if m != nil {
  1718. return m.Codespace
  1719. }
  1720. return ""
  1721. }
  1722. type ResponseDeliverTx struct {
  1723. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1724. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1725. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1726. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1727. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1728. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1729. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1730. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1731. }
  1732. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1733. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1734. func (*ResponseDeliverTx) ProtoMessage() {}
  1735. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1736. return fileDescriptor_252557cfdd89a31a, []int{24}
  1737. }
  1738. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1739. return m.Unmarshal(b)
  1740. }
  1741. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1742. if deterministic {
  1743. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1744. } else {
  1745. b = b[:cap(b)]
  1746. n, err := m.MarshalToSizedBuffer(b)
  1747. if err != nil {
  1748. return nil, err
  1749. }
  1750. return b[:n], nil
  1751. }
  1752. }
  1753. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1754. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1755. }
  1756. func (m *ResponseDeliverTx) XXX_Size() int {
  1757. return m.Size()
  1758. }
  1759. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1760. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1761. }
  1762. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1763. func (m *ResponseDeliverTx) GetCode() uint32 {
  1764. if m != nil {
  1765. return m.Code
  1766. }
  1767. return 0
  1768. }
  1769. func (m *ResponseDeliverTx) GetData() []byte {
  1770. if m != nil {
  1771. return m.Data
  1772. }
  1773. return nil
  1774. }
  1775. func (m *ResponseDeliverTx) GetLog() string {
  1776. if m != nil {
  1777. return m.Log
  1778. }
  1779. return ""
  1780. }
  1781. func (m *ResponseDeliverTx) GetInfo() string {
  1782. if m != nil {
  1783. return m.Info
  1784. }
  1785. return ""
  1786. }
  1787. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1788. if m != nil {
  1789. return m.GasWanted
  1790. }
  1791. return 0
  1792. }
  1793. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1794. if m != nil {
  1795. return m.GasUsed
  1796. }
  1797. return 0
  1798. }
  1799. func (m *ResponseDeliverTx) GetEvents() []Event {
  1800. if m != nil {
  1801. return m.Events
  1802. }
  1803. return nil
  1804. }
  1805. func (m *ResponseDeliverTx) GetCodespace() string {
  1806. if m != nil {
  1807. return m.Codespace
  1808. }
  1809. return ""
  1810. }
  1811. type ResponseEndBlock struct {
  1812. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1813. ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1814. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1815. }
  1816. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1817. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1818. func (*ResponseEndBlock) ProtoMessage() {}
  1819. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1820. return fileDescriptor_252557cfdd89a31a, []int{25}
  1821. }
  1822. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1823. return m.Unmarshal(b)
  1824. }
  1825. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1826. if deterministic {
  1827. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1828. } else {
  1829. b = b[:cap(b)]
  1830. n, err := m.MarshalToSizedBuffer(b)
  1831. if err != nil {
  1832. return nil, err
  1833. }
  1834. return b[:n], nil
  1835. }
  1836. }
  1837. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1838. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1839. }
  1840. func (m *ResponseEndBlock) XXX_Size() int {
  1841. return m.Size()
  1842. }
  1843. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1844. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1845. }
  1846. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1847. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1848. if m != nil {
  1849. return m.ValidatorUpdates
  1850. }
  1851. return nil
  1852. }
  1853. func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams {
  1854. if m != nil {
  1855. return m.ConsensusParamUpdates
  1856. }
  1857. return nil
  1858. }
  1859. func (m *ResponseEndBlock) GetEvents() []Event {
  1860. if m != nil {
  1861. return m.Events
  1862. }
  1863. return nil
  1864. }
  1865. type ResponseCommit struct {
  1866. // reserve 1
  1867. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1868. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1869. }
  1870. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1871. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1872. func (*ResponseCommit) ProtoMessage() {}
  1873. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1874. return fileDescriptor_252557cfdd89a31a, []int{26}
  1875. }
  1876. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1877. return m.Unmarshal(b)
  1878. }
  1879. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1880. if deterministic {
  1881. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1882. } else {
  1883. b = b[:cap(b)]
  1884. n, err := m.MarshalToSizedBuffer(b)
  1885. if err != nil {
  1886. return nil, err
  1887. }
  1888. return b[:n], nil
  1889. }
  1890. }
  1891. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1892. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1893. }
  1894. func (m *ResponseCommit) XXX_Size() int {
  1895. return m.Size()
  1896. }
  1897. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1898. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1899. }
  1900. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1901. func (m *ResponseCommit) GetData() []byte {
  1902. if m != nil {
  1903. return m.Data
  1904. }
  1905. return nil
  1906. }
  1907. func (m *ResponseCommit) GetRetainHeight() int64 {
  1908. if m != nil {
  1909. return m.RetainHeight
  1910. }
  1911. return 0
  1912. }
  1913. type ResponseListSnapshots struct {
  1914. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1915. }
  1916. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1917. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1918. func (*ResponseListSnapshots) ProtoMessage() {}
  1919. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1920. return fileDescriptor_252557cfdd89a31a, []int{27}
  1921. }
  1922. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1923. return m.Unmarshal(b)
  1924. }
  1925. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1926. if deterministic {
  1927. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1928. } else {
  1929. b = b[:cap(b)]
  1930. n, err := m.MarshalToSizedBuffer(b)
  1931. if err != nil {
  1932. return nil, err
  1933. }
  1934. return b[:n], nil
  1935. }
  1936. }
  1937. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1938. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1939. }
  1940. func (m *ResponseListSnapshots) XXX_Size() int {
  1941. return m.Size()
  1942. }
  1943. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1944. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1945. }
  1946. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1947. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1948. if m != nil {
  1949. return m.Snapshots
  1950. }
  1951. return nil
  1952. }
  1953. type ResponseOfferSnapshot struct {
  1954. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1955. }
  1956. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1957. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1958. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1959. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1960. return fileDescriptor_252557cfdd89a31a, []int{28}
  1961. }
  1962. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1963. return m.Unmarshal(b)
  1964. }
  1965. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1966. if deterministic {
  1967. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1968. } else {
  1969. b = b[:cap(b)]
  1970. n, err := m.MarshalToSizedBuffer(b)
  1971. if err != nil {
  1972. return nil, err
  1973. }
  1974. return b[:n], nil
  1975. }
  1976. }
  1977. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  1978. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  1979. }
  1980. func (m *ResponseOfferSnapshot) XXX_Size() int {
  1981. return m.Size()
  1982. }
  1983. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  1984. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  1985. }
  1986. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  1987. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  1988. if m != nil {
  1989. return m.Result
  1990. }
  1991. return ResponseOfferSnapshot_UNKNOWN
  1992. }
  1993. type ResponseLoadSnapshotChunk struct {
  1994. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  1995. }
  1996. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  1997. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  1998. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  1999. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2000. return fileDescriptor_252557cfdd89a31a, []int{29}
  2001. }
  2002. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2003. return m.Unmarshal(b)
  2004. }
  2005. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2006. if deterministic {
  2007. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2008. } else {
  2009. b = b[:cap(b)]
  2010. n, err := m.MarshalToSizedBuffer(b)
  2011. if err != nil {
  2012. return nil, err
  2013. }
  2014. return b[:n], nil
  2015. }
  2016. }
  2017. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2018. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2019. }
  2020. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2021. return m.Size()
  2022. }
  2023. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2024. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2025. }
  2026. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2027. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2028. if m != nil {
  2029. return m.Chunk
  2030. }
  2031. return nil
  2032. }
  2033. type ResponseApplySnapshotChunk struct {
  2034. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2035. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2036. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2037. }
  2038. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2039. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2040. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2041. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2042. return fileDescriptor_252557cfdd89a31a, []int{30}
  2043. }
  2044. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2045. return m.Unmarshal(b)
  2046. }
  2047. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2048. if deterministic {
  2049. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2050. } else {
  2051. b = b[:cap(b)]
  2052. n, err := m.MarshalToSizedBuffer(b)
  2053. if err != nil {
  2054. return nil, err
  2055. }
  2056. return b[:n], nil
  2057. }
  2058. }
  2059. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2060. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2061. }
  2062. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2063. return m.Size()
  2064. }
  2065. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2066. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2067. }
  2068. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2069. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2070. if m != nil {
  2071. return m.Result
  2072. }
  2073. return ResponseApplySnapshotChunk_UNKNOWN
  2074. }
  2075. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2076. if m != nil {
  2077. return m.RefetchChunks
  2078. }
  2079. return nil
  2080. }
  2081. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2082. if m != nil {
  2083. return m.RejectSenders
  2084. }
  2085. return nil
  2086. }
  2087. // ConsensusParams contains all consensus-relevant parameters
  2088. // that can be adjusted by the abci app
  2089. type ConsensusParams struct {
  2090. Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
  2091. Evidence *types1.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
  2092. Validator *types1.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"`
  2093. Version *types1.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  2094. }
  2095. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  2096. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  2097. func (*ConsensusParams) ProtoMessage() {}
  2098. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  2099. return fileDescriptor_252557cfdd89a31a, []int{31}
  2100. }
  2101. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  2102. return m.Unmarshal(b)
  2103. }
  2104. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2105. if deterministic {
  2106. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  2107. } else {
  2108. b = b[:cap(b)]
  2109. n, err := m.MarshalToSizedBuffer(b)
  2110. if err != nil {
  2111. return nil, err
  2112. }
  2113. return b[:n], nil
  2114. }
  2115. }
  2116. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  2117. xxx_messageInfo_ConsensusParams.Merge(m, src)
  2118. }
  2119. func (m *ConsensusParams) XXX_Size() int {
  2120. return m.Size()
  2121. }
  2122. func (m *ConsensusParams) XXX_DiscardUnknown() {
  2123. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  2124. }
  2125. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  2126. func (m *ConsensusParams) GetBlock() *BlockParams {
  2127. if m != nil {
  2128. return m.Block
  2129. }
  2130. return nil
  2131. }
  2132. func (m *ConsensusParams) GetEvidence() *types1.EvidenceParams {
  2133. if m != nil {
  2134. return m.Evidence
  2135. }
  2136. return nil
  2137. }
  2138. func (m *ConsensusParams) GetValidator() *types1.ValidatorParams {
  2139. if m != nil {
  2140. return m.Validator
  2141. }
  2142. return nil
  2143. }
  2144. func (m *ConsensusParams) GetVersion() *types1.VersionParams {
  2145. if m != nil {
  2146. return m.Version
  2147. }
  2148. return nil
  2149. }
  2150. // BlockParams contains limits on the block size.
  2151. type BlockParams struct {
  2152. // Note: must be greater than 0
  2153. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  2154. // Note: must be greater or equal to -1
  2155. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  2156. }
  2157. func (m *BlockParams) Reset() { *m = BlockParams{} }
  2158. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  2159. func (*BlockParams) ProtoMessage() {}
  2160. func (*BlockParams) Descriptor() ([]byte, []int) {
  2161. return fileDescriptor_252557cfdd89a31a, []int{32}
  2162. }
  2163. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  2164. return m.Unmarshal(b)
  2165. }
  2166. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2167. if deterministic {
  2168. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  2169. } else {
  2170. b = b[:cap(b)]
  2171. n, err := m.MarshalToSizedBuffer(b)
  2172. if err != nil {
  2173. return nil, err
  2174. }
  2175. return b[:n], nil
  2176. }
  2177. }
  2178. func (m *BlockParams) XXX_Merge(src proto.Message) {
  2179. xxx_messageInfo_BlockParams.Merge(m, src)
  2180. }
  2181. func (m *BlockParams) XXX_Size() int {
  2182. return m.Size()
  2183. }
  2184. func (m *BlockParams) XXX_DiscardUnknown() {
  2185. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  2186. }
  2187. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  2188. func (m *BlockParams) GetMaxBytes() int64 {
  2189. if m != nil {
  2190. return m.MaxBytes
  2191. }
  2192. return 0
  2193. }
  2194. func (m *BlockParams) GetMaxGas() int64 {
  2195. if m != nil {
  2196. return m.MaxGas
  2197. }
  2198. return 0
  2199. }
  2200. type LastCommitInfo struct {
  2201. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2202. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2203. }
  2204. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2205. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2206. func (*LastCommitInfo) ProtoMessage() {}
  2207. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2208. return fileDescriptor_252557cfdd89a31a, []int{33}
  2209. }
  2210. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2211. return m.Unmarshal(b)
  2212. }
  2213. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2214. if deterministic {
  2215. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2216. } else {
  2217. b = b[:cap(b)]
  2218. n, err := m.MarshalToSizedBuffer(b)
  2219. if err != nil {
  2220. return nil, err
  2221. }
  2222. return b[:n], nil
  2223. }
  2224. }
  2225. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2226. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2227. }
  2228. func (m *LastCommitInfo) XXX_Size() int {
  2229. return m.Size()
  2230. }
  2231. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2232. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2233. }
  2234. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2235. func (m *LastCommitInfo) GetRound() int32 {
  2236. if m != nil {
  2237. return m.Round
  2238. }
  2239. return 0
  2240. }
  2241. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2242. if m != nil {
  2243. return m.Votes
  2244. }
  2245. return nil
  2246. }
  2247. // Event allows application developers to attach additional information to
  2248. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2249. // Later, transactions may be queried using these events.
  2250. type Event struct {
  2251. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2252. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2253. }
  2254. func (m *Event) Reset() { *m = Event{} }
  2255. func (m *Event) String() string { return proto.CompactTextString(m) }
  2256. func (*Event) ProtoMessage() {}
  2257. func (*Event) Descriptor() ([]byte, []int) {
  2258. return fileDescriptor_252557cfdd89a31a, []int{34}
  2259. }
  2260. func (m *Event) XXX_Unmarshal(b []byte) error {
  2261. return m.Unmarshal(b)
  2262. }
  2263. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2264. if deterministic {
  2265. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2266. } else {
  2267. b = b[:cap(b)]
  2268. n, err := m.MarshalToSizedBuffer(b)
  2269. if err != nil {
  2270. return nil, err
  2271. }
  2272. return b[:n], nil
  2273. }
  2274. }
  2275. func (m *Event) XXX_Merge(src proto.Message) {
  2276. xxx_messageInfo_Event.Merge(m, src)
  2277. }
  2278. func (m *Event) XXX_Size() int {
  2279. return m.Size()
  2280. }
  2281. func (m *Event) XXX_DiscardUnknown() {
  2282. xxx_messageInfo_Event.DiscardUnknown(m)
  2283. }
  2284. var xxx_messageInfo_Event proto.InternalMessageInfo
  2285. func (m *Event) GetType() string {
  2286. if m != nil {
  2287. return m.Type
  2288. }
  2289. return ""
  2290. }
  2291. func (m *Event) GetAttributes() []EventAttribute {
  2292. if m != nil {
  2293. return m.Attributes
  2294. }
  2295. return nil
  2296. }
  2297. // EventAttribute is a single key-value pair, associated with an event.
  2298. type EventAttribute struct {
  2299. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2300. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2301. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2302. }
  2303. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2304. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2305. func (*EventAttribute) ProtoMessage() {}
  2306. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2307. return fileDescriptor_252557cfdd89a31a, []int{35}
  2308. }
  2309. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2310. return m.Unmarshal(b)
  2311. }
  2312. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2313. if deterministic {
  2314. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2315. } else {
  2316. b = b[:cap(b)]
  2317. n, err := m.MarshalToSizedBuffer(b)
  2318. if err != nil {
  2319. return nil, err
  2320. }
  2321. return b[:n], nil
  2322. }
  2323. }
  2324. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2325. xxx_messageInfo_EventAttribute.Merge(m, src)
  2326. }
  2327. func (m *EventAttribute) XXX_Size() int {
  2328. return m.Size()
  2329. }
  2330. func (m *EventAttribute) XXX_DiscardUnknown() {
  2331. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2332. }
  2333. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2334. func (m *EventAttribute) GetKey() []byte {
  2335. if m != nil {
  2336. return m.Key
  2337. }
  2338. return nil
  2339. }
  2340. func (m *EventAttribute) GetValue() []byte {
  2341. if m != nil {
  2342. return m.Value
  2343. }
  2344. return nil
  2345. }
  2346. func (m *EventAttribute) GetIndex() bool {
  2347. if m != nil {
  2348. return m.Index
  2349. }
  2350. return false
  2351. }
  2352. // TxResult contains results of executing the transaction.
  2353. //
  2354. // One usage is indexing transaction results.
  2355. type TxResult struct {
  2356. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2357. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2358. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2359. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2360. }
  2361. func (m *TxResult) Reset() { *m = TxResult{} }
  2362. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2363. func (*TxResult) ProtoMessage() {}
  2364. func (*TxResult) Descriptor() ([]byte, []int) {
  2365. return fileDescriptor_252557cfdd89a31a, []int{36}
  2366. }
  2367. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2368. return m.Unmarshal(b)
  2369. }
  2370. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2371. if deterministic {
  2372. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2373. } else {
  2374. b = b[:cap(b)]
  2375. n, err := m.MarshalToSizedBuffer(b)
  2376. if err != nil {
  2377. return nil, err
  2378. }
  2379. return b[:n], nil
  2380. }
  2381. }
  2382. func (m *TxResult) XXX_Merge(src proto.Message) {
  2383. xxx_messageInfo_TxResult.Merge(m, src)
  2384. }
  2385. func (m *TxResult) XXX_Size() int {
  2386. return m.Size()
  2387. }
  2388. func (m *TxResult) XXX_DiscardUnknown() {
  2389. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2390. }
  2391. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2392. func (m *TxResult) GetHeight() int64 {
  2393. if m != nil {
  2394. return m.Height
  2395. }
  2396. return 0
  2397. }
  2398. func (m *TxResult) GetIndex() uint32 {
  2399. if m != nil {
  2400. return m.Index
  2401. }
  2402. return 0
  2403. }
  2404. func (m *TxResult) GetTx() []byte {
  2405. if m != nil {
  2406. return m.Tx
  2407. }
  2408. return nil
  2409. }
  2410. func (m *TxResult) GetResult() ResponseDeliverTx {
  2411. if m != nil {
  2412. return m.Result
  2413. }
  2414. return ResponseDeliverTx{}
  2415. }
  2416. // Validator
  2417. type Validator struct {
  2418. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2419. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2420. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2421. }
  2422. func (m *Validator) Reset() { *m = Validator{} }
  2423. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2424. func (*Validator) ProtoMessage() {}
  2425. func (*Validator) Descriptor() ([]byte, []int) {
  2426. return fileDescriptor_252557cfdd89a31a, []int{37}
  2427. }
  2428. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2429. return m.Unmarshal(b)
  2430. }
  2431. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2432. if deterministic {
  2433. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2434. } else {
  2435. b = b[:cap(b)]
  2436. n, err := m.MarshalToSizedBuffer(b)
  2437. if err != nil {
  2438. return nil, err
  2439. }
  2440. return b[:n], nil
  2441. }
  2442. }
  2443. func (m *Validator) XXX_Merge(src proto.Message) {
  2444. xxx_messageInfo_Validator.Merge(m, src)
  2445. }
  2446. func (m *Validator) XXX_Size() int {
  2447. return m.Size()
  2448. }
  2449. func (m *Validator) XXX_DiscardUnknown() {
  2450. xxx_messageInfo_Validator.DiscardUnknown(m)
  2451. }
  2452. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2453. func (m *Validator) GetAddress() []byte {
  2454. if m != nil {
  2455. return m.Address
  2456. }
  2457. return nil
  2458. }
  2459. func (m *Validator) GetPower() int64 {
  2460. if m != nil {
  2461. return m.Power
  2462. }
  2463. return 0
  2464. }
  2465. // ValidatorUpdate
  2466. type ValidatorUpdate struct {
  2467. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2468. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2469. }
  2470. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2471. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2472. func (*ValidatorUpdate) ProtoMessage() {}
  2473. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2474. return fileDescriptor_252557cfdd89a31a, []int{38}
  2475. }
  2476. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2477. return m.Unmarshal(b)
  2478. }
  2479. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2480. if deterministic {
  2481. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2482. } else {
  2483. b = b[:cap(b)]
  2484. n, err := m.MarshalToSizedBuffer(b)
  2485. if err != nil {
  2486. return nil, err
  2487. }
  2488. return b[:n], nil
  2489. }
  2490. }
  2491. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2492. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2493. }
  2494. func (m *ValidatorUpdate) XXX_Size() int {
  2495. return m.Size()
  2496. }
  2497. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2498. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2499. }
  2500. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2501. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2502. if m != nil {
  2503. return m.PubKey
  2504. }
  2505. return crypto.PublicKey{}
  2506. }
  2507. func (m *ValidatorUpdate) GetPower() int64 {
  2508. if m != nil {
  2509. return m.Power
  2510. }
  2511. return 0
  2512. }
  2513. // VoteInfo
  2514. type VoteInfo struct {
  2515. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2516. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2517. }
  2518. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2519. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2520. func (*VoteInfo) ProtoMessage() {}
  2521. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2522. return fileDescriptor_252557cfdd89a31a, []int{39}
  2523. }
  2524. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2525. return m.Unmarshal(b)
  2526. }
  2527. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2528. if deterministic {
  2529. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2530. } else {
  2531. b = b[:cap(b)]
  2532. n, err := m.MarshalToSizedBuffer(b)
  2533. if err != nil {
  2534. return nil, err
  2535. }
  2536. return b[:n], nil
  2537. }
  2538. }
  2539. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2540. xxx_messageInfo_VoteInfo.Merge(m, src)
  2541. }
  2542. func (m *VoteInfo) XXX_Size() int {
  2543. return m.Size()
  2544. }
  2545. func (m *VoteInfo) XXX_DiscardUnknown() {
  2546. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2547. }
  2548. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2549. func (m *VoteInfo) GetValidator() Validator {
  2550. if m != nil {
  2551. return m.Validator
  2552. }
  2553. return Validator{}
  2554. }
  2555. func (m *VoteInfo) GetSignedLastBlock() bool {
  2556. if m != nil {
  2557. return m.SignedLastBlock
  2558. }
  2559. return false
  2560. }
  2561. type Evidence struct {
  2562. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2563. // The offending validator
  2564. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2565. // The height when the offense occurred
  2566. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2567. // The corresponding time where the offense occurred
  2568. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2569. // Total voting power of the validator set in case the ABCI application does
  2570. // not store historical validators.
  2571. // https://github.com/tendermint/tendermint/issues/4581
  2572. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2573. }
  2574. func (m *Evidence) Reset() { *m = Evidence{} }
  2575. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2576. func (*Evidence) ProtoMessage() {}
  2577. func (*Evidence) Descriptor() ([]byte, []int) {
  2578. return fileDescriptor_252557cfdd89a31a, []int{40}
  2579. }
  2580. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2581. return m.Unmarshal(b)
  2582. }
  2583. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2584. if deterministic {
  2585. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2586. } else {
  2587. b = b[:cap(b)]
  2588. n, err := m.MarshalToSizedBuffer(b)
  2589. if err != nil {
  2590. return nil, err
  2591. }
  2592. return b[:n], nil
  2593. }
  2594. }
  2595. func (m *Evidence) XXX_Merge(src proto.Message) {
  2596. xxx_messageInfo_Evidence.Merge(m, src)
  2597. }
  2598. func (m *Evidence) XXX_Size() int {
  2599. return m.Size()
  2600. }
  2601. func (m *Evidence) XXX_DiscardUnknown() {
  2602. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2603. }
  2604. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2605. func (m *Evidence) GetType() EvidenceType {
  2606. if m != nil {
  2607. return m.Type
  2608. }
  2609. return EvidenceType_UNKNOWN
  2610. }
  2611. func (m *Evidence) GetValidator() Validator {
  2612. if m != nil {
  2613. return m.Validator
  2614. }
  2615. return Validator{}
  2616. }
  2617. func (m *Evidence) GetHeight() int64 {
  2618. if m != nil {
  2619. return m.Height
  2620. }
  2621. return 0
  2622. }
  2623. func (m *Evidence) GetTime() time.Time {
  2624. if m != nil {
  2625. return m.Time
  2626. }
  2627. return time.Time{}
  2628. }
  2629. func (m *Evidence) GetTotalVotingPower() int64 {
  2630. if m != nil {
  2631. return m.TotalVotingPower
  2632. }
  2633. return 0
  2634. }
  2635. type Snapshot struct {
  2636. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2637. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2638. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2639. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2640. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2641. }
  2642. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2643. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2644. func (*Snapshot) ProtoMessage() {}
  2645. func (*Snapshot) Descriptor() ([]byte, []int) {
  2646. return fileDescriptor_252557cfdd89a31a, []int{41}
  2647. }
  2648. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2649. return m.Unmarshal(b)
  2650. }
  2651. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2652. if deterministic {
  2653. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2654. } else {
  2655. b = b[:cap(b)]
  2656. n, err := m.MarshalToSizedBuffer(b)
  2657. if err != nil {
  2658. return nil, err
  2659. }
  2660. return b[:n], nil
  2661. }
  2662. }
  2663. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2664. xxx_messageInfo_Snapshot.Merge(m, src)
  2665. }
  2666. func (m *Snapshot) XXX_Size() int {
  2667. return m.Size()
  2668. }
  2669. func (m *Snapshot) XXX_DiscardUnknown() {
  2670. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2671. }
  2672. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2673. func (m *Snapshot) GetHeight() uint64 {
  2674. if m != nil {
  2675. return m.Height
  2676. }
  2677. return 0
  2678. }
  2679. func (m *Snapshot) GetFormat() uint32 {
  2680. if m != nil {
  2681. return m.Format
  2682. }
  2683. return 0
  2684. }
  2685. func (m *Snapshot) GetChunks() uint32 {
  2686. if m != nil {
  2687. return m.Chunks
  2688. }
  2689. return 0
  2690. }
  2691. func (m *Snapshot) GetHash() []byte {
  2692. if m != nil {
  2693. return m.Hash
  2694. }
  2695. return nil
  2696. }
  2697. func (m *Snapshot) GetMetadata() []byte {
  2698. if m != nil {
  2699. return m.Metadata
  2700. }
  2701. return nil
  2702. }
  2703. func init() {
  2704. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2705. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2706. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2707. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2708. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2709. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2710. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2711. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2712. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2713. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2714. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2715. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2716. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2717. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2718. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2719. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2720. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2721. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2722. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2723. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2724. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2725. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2726. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2727. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2728. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2729. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2730. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2731. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2732. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2733. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2734. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2735. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2736. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2737. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2738. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2739. proto.RegisterType((*ConsensusParams)(nil), "tendermint.abci.ConsensusParams")
  2740. proto.RegisterType((*BlockParams)(nil), "tendermint.abci.BlockParams")
  2741. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2742. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2743. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2744. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2745. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2746. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2747. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2748. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2749. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2750. }
  2751. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2752. var fileDescriptor_252557cfdd89a31a = []byte{
  2753. // 2677 bytes of a gzipped FileDescriptorProto
  2754. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7,
  2755. 0x11, 0xc6, 0x1b, 0xd8, 0x26, 0xf1, 0xe0, 0x88, 0x96, 0x61, 0x58, 0x26, 0xe5, 0x75, 0xd9, 0xb1,
  2756. 0x64, 0x9b, 0x8c, 0xa9, 0x92, 0x22, 0x95, 0x9d, 0xd8, 0x04, 0x04, 0x19, 0x34, 0x19, 0x92, 0x59,
  2757. 0x42, 0x72, 0x5e, 0xd6, 0x7a, 0x80, 0x1d, 0x02, 0x6b, 0x01, 0xbb, 0x6b, 0xec, 0x80, 0x22, 0x7d,
  2758. 0xcc, 0xe3, 0xa2, 0x5c, 0x7c, 0xcc, 0xc5, 0x55, 0xf9, 0x07, 0xb9, 0xe6, 0x94, 0x4b, 0x2e, 0xae,
  2759. 0x4a, 0xa5, 0xca, 0xc7, 0x9c, 0x9c, 0x94, 0x74, 0xcb, 0x1f, 0xc8, 0x29, 0x95, 0xd4, 0x3c, 0xf6,
  2760. 0x05, 0x60, 0x09, 0x30, 0xce, 0x2d, 0xb7, 0x9d, 0xde, 0xee, 0xc6, 0x4c, 0xef, 0xf4, 0xd7, 0xdf,
  2761. 0xf4, 0x00, 0x5e, 0xa4, 0xc4, 0x32, 0xc8, 0x68, 0x68, 0x5a, 0x74, 0x13, 0x77, 0xba, 0xe6, 0x26,
  2762. 0x3d, 0x73, 0x88, 0xbb, 0xe1, 0x8c, 0x6c, 0x6a, 0xa3, 0x72, 0xf0, 0x72, 0x83, 0xbd, 0xac, 0xbd,
  2763. 0x14, 0xd2, 0xee, 0x8e, 0xce, 0x1c, 0x6a, 0x6f, 0x3a, 0x23, 0xdb, 0x3e, 0x16, 0xfa, 0xb5, 0x2b,
  2764. 0xa1, 0xd7, 0xdc, 0x4f, 0xd8, 0x5b, 0xe4, 0xad, 0x34, 0x7e, 0x44, 0xce, 0xbc, 0xb7, 0x2f, 0x4d,
  2765. 0xd9, 0x3a, 0x78, 0x84, 0x87, 0xde, 0xeb, 0xf5, 0x9e, 0x6d, 0xf7, 0x06, 0x64, 0x93, 0x8f, 0x3a,
  2766. 0xe3, 0xe3, 0x4d, 0x6a, 0x0e, 0x89, 0x4b, 0xf1, 0xd0, 0x91, 0x0a, 0xab, 0x3d, 0xbb, 0x67, 0xf3,
  2767. 0xc7, 0x4d, 0xf6, 0x24, 0xa4, 0xea, 0x5f, 0xf2, 0x90, 0xd7, 0xc8, 0x67, 0x63, 0xe2, 0x52, 0xb4,
  2768. 0x05, 0x19, 0xd2, 0xed, 0xdb, 0xd5, 0xe4, 0xd5, 0xe4, 0xeb, 0x4b, 0x5b, 0x57, 0x36, 0x26, 0x16,
  2769. 0xb7, 0x21, 0xf5, 0x9a, 0xdd, 0xbe, 0xdd, 0x4a, 0x68, 0x5c, 0x17, 0xdd, 0x84, 0xec, 0xf1, 0x60,
  2770. 0xec, 0xf6, 0xab, 0x29, 0x6e, 0xf4, 0x52, 0x9c, 0xd1, 0x3d, 0xa6, 0xd4, 0x4a, 0x68, 0x42, 0x9b,
  2771. 0xfd, 0x94, 0x69, 0x1d, 0xdb, 0xd5, 0xf4, 0xf9, 0x3f, 0xb5, 0x63, 0x1d, 0xf3, 0x9f, 0x62, 0xba,
  2772. 0xa8, 0x0e, 0x60, 0x5a, 0x26, 0xd5, 0xbb, 0x7d, 0x6c, 0x5a, 0xd5, 0x0c, 0xb7, 0x7c, 0x39, 0xde,
  2773. 0xd2, 0xa4, 0x0d, 0xa6, 0xd8, 0x4a, 0x68, 0x8a, 0xe9, 0x0d, 0xd8, 0x74, 0x3f, 0x1b, 0x93, 0xd1,
  2774. 0x59, 0x35, 0x7b, 0xfe, 0x74, 0x7f, 0xc4, 0x94, 0xd8, 0x74, 0xb9, 0x36, 0x6a, 0xc2, 0x52, 0x87,
  2775. 0xf4, 0x4c, 0x4b, 0xef, 0x0c, 0xec, 0xee, 0xa3, 0x6a, 0x8e, 0x1b, 0xab, 0x71, 0xc6, 0x75, 0xa6,
  2776. 0x5a, 0x67, 0x9a, 0xad, 0x84, 0x06, 0x1d, 0x7f, 0x84, 0xde, 0x85, 0x42, 0xb7, 0x4f, 0xba, 0x8f,
  2777. 0x74, 0x7a, 0x5a, 0xcd, 0x73, 0x1f, 0xeb, 0x71, 0x3e, 0x1a, 0x4c, 0xaf, 0x7d, 0xda, 0x4a, 0x68,
  2778. 0xf9, 0xae, 0x78, 0x64, 0xeb, 0x37, 0xc8, 0xc0, 0x3c, 0x21, 0x23, 0x66, 0x5f, 0x38, 0x7f, 0xfd,
  2779. 0x77, 0x85, 0x26, 0xf7, 0xa0, 0x18, 0xde, 0x00, 0xbd, 0x07, 0x0a, 0xb1, 0x0c, 0xb9, 0x0c, 0x85,
  2780. 0xbb, 0xb8, 0x1a, 0xfb, 0x9d, 0x2d, 0xc3, 0x5b, 0x44, 0x81, 0xc8, 0x67, 0x74, 0x1b, 0x72, 0x5d,
  2781. 0x7b, 0x38, 0x34, 0x69, 0x15, 0xb8, 0xf5, 0x5a, 0xec, 0x02, 0xb8, 0x56, 0x2b, 0xa1, 0x49, 0x7d,
  2782. 0xb4, 0x0f, 0xa5, 0x81, 0xe9, 0x52, 0xdd, 0xb5, 0xb0, 0xe3, 0xf6, 0x6d, 0xea, 0x56, 0x97, 0xb8,
  2783. 0x87, 0x57, 0xe3, 0x3c, 0xec, 0x99, 0x2e, 0x3d, 0xf2, 0x94, 0x5b, 0x09, 0xad, 0x38, 0x08, 0x0b,
  2784. 0x98, 0x3f, 0xfb, 0xf8, 0x98, 0x8c, 0x7c, 0x87, 0xd5, 0xe5, 0xf3, 0xfd, 0x1d, 0x30, 0x6d, 0xcf,
  2785. 0x9e, 0xf9, 0xb3, 0xc3, 0x02, 0xf4, 0x33, 0xb8, 0x34, 0xb0, 0xb1, 0xe1, 0xbb, 0xd3, 0xbb, 0xfd,
  2786. 0xb1, 0xf5, 0xa8, 0x5a, 0xe4, 0x4e, 0xaf, 0xc5, 0x4e, 0xd2, 0xc6, 0x86, 0xe7, 0xa2, 0xc1, 0x0c,
  2787. 0x5a, 0x09, 0x6d, 0x65, 0x30, 0x29, 0x44, 0x0f, 0x61, 0x15, 0x3b, 0xce, 0xe0, 0x6c, 0xd2, 0x7b,
  2788. 0x89, 0x7b, 0xbf, 0x1e, 0xe7, 0x7d, 0x9b, 0xd9, 0x4c, 0xba, 0x47, 0x78, 0x4a, 0x5a, 0xcf, 0x43,
  2789. 0xf6, 0x04, 0x0f, 0xc6, 0x44, 0xfd, 0x0e, 0x2c, 0x85, 0xd2, 0x14, 0x55, 0x21, 0x3f, 0x24, 0xae,
  2790. 0x8b, 0x7b, 0x84, 0x67, 0xb5, 0xa2, 0x79, 0x43, 0xb5, 0x04, 0xcb, 0xe1, 0xd4, 0x54, 0x87, 0xbe,
  2791. 0x21, 0x4b, 0x3a, 0x66, 0x78, 0x42, 0x46, 0xae, 0x69, 0x5b, 0x9e, 0xa1, 0x1c, 0xa2, 0x57, 0xa0,
  2792. 0xc8, 0xb7, 0x8f, 0xee, 0xbd, 0x67, 0x99, 0x9f, 0xd1, 0x96, 0xb9, 0xf0, 0x81, 0x54, 0x5a, 0x87,
  2793. 0x25, 0x67, 0xcb, 0xf1, 0x55, 0xd2, 0x5c, 0x05, 0x9c, 0x2d, 0x47, 0x2a, 0xa8, 0x7f, 0x4e, 0x41,
  2794. 0x65, 0x32, 0x55, 0xd1, 0x6d, 0xc8, 0x30, 0xd4, 0x92, 0x00, 0x54, 0xdb, 0x10, 0x90, 0xb6, 0xe1,
  2795. 0x41, 0xda, 0x46, 0xdb, 0x83, 0xb4, 0x7a, 0xe1, 0xab, 0x6f, 0xd6, 0x13, 0x5f, 0xfc, 0x6d, 0x3d,
  2796. 0xa9, 0x71, 0x0b, 0xf4, 0x02, 0xcb, 0x2c, 0x6c, 0x5a, 0xba, 0x69, 0xf0, 0xf9, 0x28, 0x2c, 0x6d,
  2797. 0xb0, 0x69, 0xed, 0x18, 0x68, 0x17, 0x2a, 0x5d, 0xdb, 0x72, 0x89, 0xe5, 0x8e, 0x5d, 0x5d, 0x40,
  2798. 0xa6, 0x84, 0x9d, 0xe9, 0x9d, 0xdf, 0xf0, 0x14, 0x0f, 0xb9, 0x9e, 0x56, 0xee, 0x46, 0x05, 0xe8,
  2799. 0x1e, 0xc0, 0x09, 0x1e, 0x98, 0x06, 0xa6, 0xf6, 0xc8, 0xad, 0x66, 0xae, 0xa6, 0x67, 0xba, 0x79,
  2800. 0xe0, 0xa9, 0xdc, 0x77, 0x0c, 0x4c, 0x49, 0x3d, 0xc3, 0x66, 0xab, 0x85, 0x2c, 0xd1, 0x6b, 0x50,
  2801. 0xc6, 0x8e, 0xa3, 0xbb, 0x14, 0x53, 0xa2, 0x77, 0xce, 0x28, 0x71, 0x39, 0x22, 0x2d, 0x6b, 0x45,
  2802. 0xec, 0x38, 0x47, 0x4c, 0x5a, 0x67, 0x42, 0xf4, 0x2a, 0x94, 0x18, 0x78, 0x99, 0x78, 0xa0, 0xf7,
  2803. 0x89, 0xd9, 0xeb, 0x53, 0x8e, 0x3d, 0x69, 0xad, 0x28, 0xa5, 0x2d, 0x2e, 0x54, 0x0d, 0xff, 0x63,
  2804. 0x72, 0xe0, 0x42, 0x08, 0x32, 0x06, 0xa6, 0x98, 0x07, 0x72, 0x59, 0xe3, 0xcf, 0x4c, 0xe6, 0x60,
  2805. 0xda, 0x97, 0xe1, 0xe1, 0xcf, 0xe8, 0x32, 0xe4, 0xa4, 0xdb, 0x34, 0x77, 0x2b, 0x47, 0x68, 0x15,
  2806. 0xb2, 0xce, 0xc8, 0x3e, 0x21, 0x1c, 0x65, 0x0b, 0x9a, 0x18, 0xa8, 0xbf, 0x4a, 0xc1, 0xca, 0x14,
  2807. 0xc4, 0x31, 0xbf, 0x7d, 0xec, 0xf6, 0xbd, 0xdf, 0x62, 0xcf, 0xe8, 0x16, 0xf3, 0x8b, 0x0d, 0x32,
  2808. 0x92, 0x65, 0xa1, 0x1a, 0x0e, 0x91, 0x28, 0x79, 0x2d, 0xfe, 0x5e, 0x86, 0x46, 0x6a, 0xa3, 0x03,
  2809. 0xa8, 0x0c, 0xb0, 0x4b, 0x75, 0x01, 0x19, 0x7a, 0xa8, 0x44, 0x4c, 0x03, 0xe5, 0x1e, 0xf6, 0x40,
  2810. 0x86, 0x6d, 0x58, 0xe9, 0xa8, 0x34, 0x88, 0x48, 0x91, 0x06, 0xab, 0x9d, 0xb3, 0xcf, 0xb1, 0x45,
  2811. 0x4d, 0x8b, 0xe8, 0x53, 0x5f, 0xee, 0x85, 0x29, 0xa7, 0xcd, 0x13, 0xd3, 0x20, 0x56, 0xd7, 0xfb,
  2812. 0x64, 0x97, 0x7c, 0x63, 0xff, 0x93, 0xba, 0xaa, 0x06, 0xa5, 0x28, 0x48, 0xa3, 0x12, 0xa4, 0xe8,
  2813. 0xa9, 0x0c, 0x40, 0x8a, 0x9e, 0xa2, 0xef, 0x42, 0x86, 0x2d, 0x92, 0x2f, 0xbe, 0x34, 0xa3, 0xba,
  2814. 0x49, 0xbb, 0xf6, 0x99, 0x43, 0x34, 0xae, 0xa9, 0xaa, 0x7e, 0x36, 0xf8, 0xc0, 0x3d, 0xe9, 0x55,
  2815. 0xbd, 0x06, 0xe5, 0x09, 0x64, 0x0e, 0x7d, 0xbf, 0x64, 0xf8, 0xfb, 0xa9, 0x65, 0x28, 0x46, 0x60,
  2816. 0x58, 0xbd, 0x0c, 0xab, 0xb3, 0x50, 0x55, 0xed, 0xfb, 0xf2, 0x08, 0x3a, 0xa2, 0x9b, 0x50, 0xf0,
  2817. 0x61, 0x55, 0x64, 0xe3, 0x74, 0xac, 0x3c, 0x65, 0xcd, 0x57, 0x65, 0x69, 0xc8, 0xb6, 0x35, 0xdf,
  2818. 0x0f, 0x29, 0x3e, 0xf1, 0x3c, 0x76, 0x9c, 0x16, 0x76, 0xfb, 0xea, 0x27, 0x50, 0x8d, 0x83, 0xcc,
  2819. 0x89, 0x65, 0x64, 0xfc, 0x6d, 0x78, 0x19, 0x72, 0xc7, 0xf6, 0x68, 0x88, 0x29, 0x77, 0x56, 0xd4,
  2820. 0xe4, 0x88, 0x6d, 0x4f, 0x01, 0x9f, 0x69, 0x2e, 0x16, 0x03, 0x55, 0x87, 0x17, 0x62, 0x61, 0x93,
  2821. 0x99, 0x98, 0x96, 0x41, 0x44, 0x3c, 0x8b, 0x9a, 0x18, 0x04, 0x8e, 0xc4, 0x64, 0xc5, 0x80, 0xfd,
  2822. 0xac, 0xcb, 0xd7, 0xca, 0xfd, 0x2b, 0x9a, 0x1c, 0xa9, 0xbf, 0x2b, 0x40, 0x41, 0x23, 0xae, 0xc3,
  2823. 0x30, 0x01, 0xd5, 0x41, 0x21, 0xa7, 0x5d, 0xe2, 0x50, 0x0f, 0x22, 0x67, 0x13, 0x02, 0xa1, 0xdd,
  2824. 0xf4, 0x34, 0x59, 0x35, 0xf6, 0xcd, 0xd0, 0x0d, 0x49, 0xb8, 0xe2, 0xb9, 0x93, 0x34, 0x0f, 0x33,
  2825. 0xae, 0x5b, 0x1e, 0xe3, 0x4a, 0xc7, 0x16, 0x60, 0x61, 0x35, 0x41, 0xb9, 0x6e, 0x48, 0xca, 0x95,
  2826. 0x99, 0xf3, 0x63, 0x11, 0xce, 0xd5, 0x88, 0x70, 0xae, 0xec, 0x9c, 0x65, 0xc6, 0x90, 0xae, 0x5b,
  2827. 0x1e, 0xe9, 0xca, 0xcd, 0x99, 0xf1, 0x04, 0xeb, 0xba, 0x17, 0x65, 0x5d, 0x82, 0x31, 0xbd, 0x12,
  2828. 0x6b, 0x1d, 0x4b, 0xbb, 0xbe, 0x1f, 0xa2, 0x5d, 0x85, 0x58, 0xce, 0x23, 0x9c, 0xcc, 0xe0, 0x5d,
  2829. 0x8d, 0x08, 0xef, 0x52, 0xe6, 0xc4, 0x20, 0x86, 0x78, 0xbd, 0x1f, 0x26, 0x5e, 0x10, 0xcb, 0xdd,
  2830. 0xe4, 0xf7, 0x9e, 0xc5, 0xbc, 0xee, 0xf8, 0xcc, 0x6b, 0x29, 0x96, 0x3a, 0xca, 0x35, 0x4c, 0x52,
  2831. 0xaf, 0x83, 0x29, 0xea, 0x25, 0xa8, 0xd2, 0x6b, 0xb1, 0x2e, 0xe6, 0x70, 0xaf, 0x83, 0x29, 0xee,
  2832. 0x55, 0x9c, 0xe3, 0x70, 0x0e, 0xf9, 0xfa, 0xf9, 0x6c, 0xf2, 0x15, 0x4f, 0x8f, 0xe4, 0x34, 0x17,
  2833. 0x63, 0x5f, 0x7a, 0x0c, 0xfb, 0x2a, 0x73, 0xf7, 0x6f, 0xc4, 0xba, 0xbf, 0x38, 0xfd, 0xba, 0xc6,
  2834. 0x2a, 0xe4, 0x44, 0xce, 0x33, 0x94, 0x21, 0xa3, 0x91, 0x3d, 0x92, 0x4c, 0x4a, 0x0c, 0xd4, 0xd7,
  2835. 0x59, 0xcd, 0x0e, 0xf2, 0xfb, 0x1c, 0xaa, 0xc6, 0xd1, 0x3c, 0x94, 0xd3, 0xea, 0x1f, 0x92, 0x81,
  2836. 0x2d, 0x2f, 0x73, 0xe1, 0x7a, 0xaf, 0xc8, 0x7a, 0x1f, 0x62, 0x70, 0xa9, 0x28, 0x83, 0x5b, 0x87,
  2837. 0x25, 0x86, 0xd2, 0x13, 0xe4, 0x0c, 0x3b, 0x1e, 0x39, 0x43, 0xd7, 0x61, 0x85, 0x97, 0x61, 0xc1,
  2838. 0xf3, 0x24, 0x34, 0x67, 0x78, 0x85, 0x29, 0xb3, 0x17, 0x62, 0x73, 0x0a, 0x8c, 0x7e, 0x0b, 0x2e,
  2839. 0x85, 0x74, 0x7d, 0xf4, 0x17, 0x6c, 0xa6, 0xe2, 0x6b, 0x6f, 0xcb, 0x32, 0xf0, 0xa7, 0x64, 0x10,
  2840. 0xa1, 0x80, 0xf8, 0xcd, 0xe2, 0x68, 0xc9, 0xff, 0x0d, 0x47, 0x4b, 0xfd, 0xd7, 0x1c, 0x2d, 0x5c,
  2841. 0xcc, 0xd2, 0xd1, 0x62, 0xf6, 0xcf, 0x64, 0xf0, 0x49, 0x7c, 0xc6, 0xd5, 0xb5, 0x0d, 0x22, 0xcb,
  2842. 0x0b, 0x7f, 0x46, 0x15, 0x48, 0x0f, 0xec, 0x9e, 0x2c, 0x22, 0xec, 0x91, 0x69, 0xf9, 0x18, 0xac,
  2843. 0x48, 0x88, 0xf5, 0x2b, 0x53, 0x96, 0x07, 0x58, 0x56, 0xa6, 0x0a, 0xa4, 0x1f, 0x11, 0x81, 0x98,
  2844. 0xcb, 0x1a, 0x7b, 0x64, 0x7a, 0x7c, 0x8f, 0x71, 0x1c, 0x5c, 0xd6, 0xc4, 0x00, 0xdd, 0x06, 0x85,
  2845. 0x37, 0x18, 0x74, 0xdb, 0x71, 0x25, 0xb8, 0xbd, 0x18, 0x5e, 0xab, 0xe8, 0x23, 0x6c, 0x1c, 0x32,
  2846. 0x9d, 0x03, 0xc7, 0xd5, 0x0a, 0x8e, 0x7c, 0x0a, 0x15, 0x5d, 0x25, 0xc2, 0xfd, 0xae, 0x80, 0xc2,
  2847. 0x66, 0xef, 0x3a, 0xb8, 0x4b, 0x38, 0x52, 0x29, 0x5a, 0x20, 0x50, 0x1f, 0x02, 0x9a, 0xc6, 0x5b,
  2848. 0xd4, 0x82, 0x1c, 0x39, 0x21, 0x16, 0x65, 0x5f, 0x8d, 0x85, 0xfb, 0xf2, 0x0c, 0x62, 0x45, 0x2c,
  2849. 0x5a, 0xaf, 0xb2, 0x20, 0xff, 0xe3, 0x9b, 0xf5, 0x8a, 0xd0, 0x7e, 0xd3, 0x1e, 0x9a, 0x94, 0x0c,
  2850. 0x1d, 0x7a, 0xa6, 0x49, 0x7b, 0xf5, 0x97, 0x29, 0xc6, 0x72, 0x22, 0x58, 0x3c, 0x33, 0xb6, 0xde,
  2851. 0x8e, 0x4f, 0x85, 0x18, 0xee, 0x62, 0xf1, 0x5e, 0x03, 0xe8, 0x61, 0x57, 0x7f, 0x8c, 0x2d, 0x4a,
  2852. 0x0c, 0x19, 0xf4, 0x90, 0x04, 0xd5, 0xa0, 0xc0, 0x46, 0x63, 0x97, 0x18, 0x92, 0x6c, 0xfb, 0xe3,
  2853. 0xd0, 0x3a, 0xf3, 0xdf, 0x6e, 0x9d, 0xd1, 0x28, 0x17, 0x26, 0xa3, 0xfc, 0xeb, 0x54, 0x90, 0x25,
  2854. 0x01, 0x21, 0xfc, 0xff, 0x8b, 0xc3, 0x6f, 0xf8, 0x29, 0x31, 0x5a, 0x14, 0xd1, 0x11, 0xac, 0xf8,
  2855. 0x59, 0xaa, 0x8f, 0x79, 0xf6, 0x7a, 0xfb, 0x6e, 0xd1, 0x34, 0xaf, 0x9c, 0x44, 0xc5, 0x2e, 0xfa,
  2856. 0x31, 0x3c, 0x3f, 0x81, 0x40, 0xbe, 0xeb, 0xd4, 0x82, 0x40, 0xf4, 0x5c, 0x14, 0x88, 0x3c, 0xcf,
  2857. 0x41, 0xac, 0xd2, 0xdf, 0x32, 0x37, 0x76, 0xd8, 0xc1, 0x23, 0x5c, 0xe2, 0x67, 0x7e, 0xfd, 0x57,
  2858. 0xa0, 0x38, 0x22, 0x94, 0x9d, 0x85, 0x23, 0x47, 0xbb, 0x65, 0x21, 0x94, 0x07, 0xc6, 0x43, 0x78,
  2859. 0x6e, 0x66, 0xa9, 0x47, 0xdf, 0x03, 0x25, 0x60, 0x09, 0xc9, 0x98, 0x53, 0x92, 0xcf, 0xfc, 0x03,
  2860. 0x5d, 0xf5, 0x8f, 0xc9, 0xc0, 0x65, 0xf4, 0x2c, 0xd1, 0x84, 0xdc, 0x88, 0xb8, 0xe3, 0x81, 0x60,
  2861. 0xf7, 0xa5, 0xad, 0xb7, 0x16, 0x23, 0x09, 0x4c, 0x3a, 0x1e, 0x50, 0x4d, 0x1a, 0xab, 0x0f, 0x21,
  2862. 0x27, 0x24, 0x68, 0x09, 0xf2, 0xf7, 0xf7, 0x77, 0xf7, 0x0f, 0x3e, 0xda, 0xaf, 0x24, 0x10, 0x40,
  2863. 0x6e, 0xbb, 0xd1, 0x68, 0x1e, 0xb6, 0x2b, 0x49, 0xa4, 0x40, 0x76, 0xbb, 0x7e, 0xa0, 0xb5, 0x2b,
  2864. 0x29, 0x26, 0xd6, 0x9a, 0x1f, 0x36, 0x1b, 0xed, 0x4a, 0x1a, 0xad, 0x40, 0x51, 0x3c, 0xeb, 0xf7,
  2865. 0x0e, 0xb4, 0x1f, 0x6e, 0xb7, 0x2b, 0x99, 0x90, 0xe8, 0xa8, 0xb9, 0x7f, 0xb7, 0xa9, 0x55, 0xb2,
  2866. 0xea, 0xdb, 0xec, 0xf8, 0x10, 0x43, 0x2b, 0x82, 0x83, 0x42, 0x32, 0x74, 0x50, 0x50, 0x7f, 0x9b,
  2867. 0x82, 0x5a, 0x3c, 0x57, 0x40, 0x1f, 0x4e, 0x2c, 0x7c, 0xeb, 0x02, 0x44, 0x63, 0x62, 0xf5, 0xe8,
  2868. 0x55, 0x28, 0x8d, 0xc8, 0x31, 0xa1, 0xdd, 0xbe, 0xe0, 0x2e, 0xa2, 0xb0, 0x15, 0xb5, 0xa2, 0x94,
  2869. 0x72, 0x23, 0x57, 0xa8, 0x7d, 0x4a, 0xba, 0x54, 0x17, 0x67, 0x16, 0xb1, 0xe9, 0x14, 0xa6, 0xc6,
  2870. 0xa4, 0x47, 0x42, 0xa8, 0x7e, 0x72, 0xa1, 0x58, 0x2a, 0x90, 0xd5, 0x9a, 0x6d, 0xed, 0x27, 0x95,
  2871. 0x34, 0x42, 0x50, 0xe2, 0x8f, 0xfa, 0xd1, 0xfe, 0xf6, 0xe1, 0x51, 0xeb, 0x80, 0xc5, 0xf2, 0x12,
  2872. 0x94, 0xbd, 0x58, 0x7a, 0xc2, 0xac, 0xfa, 0xef, 0x24, 0x94, 0x27, 0x12, 0x04, 0x6d, 0x41, 0x56,
  2873. 0xf0, 0xdf, 0xb8, 0x06, 0x33, 0xcf, 0x6f, 0x99, 0x4d, 0x42, 0x15, 0xbd, 0x0b, 0x05, 0x22, 0xcf,
  2874. 0xe4, 0xb3, 0x12, 0x51, 0xf4, 0x12, 0xbc, 0x53, 0xbb, 0x34, 0xf5, 0x2d, 0xd0, 0x7b, 0xa0, 0xf8,
  2875. 0x99, 0x2e, 0xcf, 0x4b, 0x2f, 0x4f, 0x9b, 0xfb, 0x18, 0x21, 0xed, 0x03, 0x1b, 0x74, 0x27, 0x20,
  2876. 0x51, 0x99, 0x69, 0xd6, 0x2d, 0xcd, 0x85, 0x82, 0x34, 0xf6, 0xf4, 0xd5, 0x06, 0x2c, 0x85, 0xd6,
  2877. 0x83, 0x5e, 0x04, 0x65, 0x88, 0x4f, 0x65, 0xaf, 0x47, 0x9c, 0xd6, 0x0b, 0x43, 0x7c, 0x2a, 0xda,
  2878. 0x3c, 0xcf, 0x43, 0x9e, 0xbd, 0xec, 0x61, 0x81, 0x36, 0x69, 0x2d, 0x37, 0xc4, 0xa7, 0x1f, 0x60,
  2879. 0x57, 0xfd, 0x18, 0x4a, 0xd1, 0x3e, 0x07, 0xdb, 0x89, 0x23, 0x7b, 0x6c, 0x19, 0xdc, 0x47, 0x56,
  2880. 0x13, 0x03, 0x74, 0x13, 0xb2, 0x27, 0xb6, 0x00, 0xab, 0xd9, 0x29, 0xfb, 0xc0, 0xa6, 0x24, 0xd4,
  2881. 0x27, 0x11, 0xda, 0xea, 0xe7, 0x90, 0xe5, 0xe0, 0xc3, 0x80, 0x84, 0x77, 0x2c, 0x24, 0x81, 0x64,
  2882. 0xcf, 0xe8, 0x63, 0x00, 0x4c, 0xe9, 0xc8, 0xec, 0x8c, 0x03, 0xc7, 0xeb, 0xb3, 0xc1, 0x6b, 0xdb,
  2883. 0xd3, 0xab, 0x5f, 0x91, 0x28, 0xb6, 0x1a, 0x98, 0x86, 0x90, 0x2c, 0xe4, 0x50, 0xdd, 0x87, 0x52,
  2884. 0xd4, 0xd6, 0xe3, 0x3c, 0xc9, 0x19, 0x9c, 0x27, 0x15, 0xe6, 0x3c, 0x3e, 0x63, 0x4a, 0x8b, 0xee,
  2885. 0x14, 0x1f, 0xa8, 0x4f, 0x92, 0x50, 0x68, 0x9f, 0xca, 0x6d, 0x1d, 0xd3, 0x18, 0x09, 0x4c, 0x53,
  2886. 0xe1, 0x36, 0x80, 0xe8, 0xb4, 0xa4, 0xfd, 0xfe, 0xcd, 0xfb, 0x7e, 0xe2, 0x66, 0x16, 0x3d, 0xed,
  2887. 0x79, 0x8d, 0x2c, 0x09, 0x56, 0xef, 0x80, 0xe2, 0xef, 0x2a, 0xc6, 0xc4, 0xb1, 0x61, 0x8c, 0x88,
  2888. 0xeb, 0xca, 0xb5, 0x79, 0x43, 0xde, 0x67, 0xb3, 0x1f, 0xcb, 0x46, 0x43, 0x5a, 0x13, 0x03, 0xd5,
  2889. 0x80, 0xf2, 0x44, 0xd9, 0x42, 0xef, 0x40, 0xde, 0x19, 0x77, 0x74, 0x2f, 0x3c, 0x13, 0xc9, 0xe3,
  2890. 0x91, 0xbc, 0x71, 0x67, 0x60, 0x76, 0x77, 0xc9, 0x99, 0x37, 0x19, 0x67, 0xdc, 0xd9, 0x15, 0x51,
  2891. 0x14, 0xbf, 0x92, 0x0a, 0xff, 0xca, 0x09, 0x14, 0xbc, 0x4d, 0x81, 0x7e, 0x10, 0xce, 0x13, 0xaf,
  2892. 0xfb, 0x1a, 0x5b, 0x4a, 0xa5, 0xfb, 0x50, 0x9a, 0x5c, 0x87, 0x15, 0xd7, 0xec, 0x59, 0xc4, 0xd0,
  2893. 0x83, 0xb3, 0x00, 0xff, 0xb5, 0x82, 0x56, 0x16, 0x2f, 0xf6, 0xbc, 0x83, 0x80, 0xfa, 0xaf, 0x24,
  2894. 0x14, 0xbc, 0x84, 0x45, 0x6f, 0x87, 0xf6, 0x5d, 0x69, 0x46, 0x53, 0xc2, 0x53, 0x0c, 0x5a, 0x65,
  2895. 0xd1, 0xb9, 0xa6, 0x2e, 0x3e, 0xd7, 0xb8, 0x9e, 0xa7, 0xd7, 0x7c, 0xce, 0x5c, 0xb8, 0xf9, 0xfc,
  2896. 0x26, 0x20, 0x6a, 0x53, 0x3c, 0xd0, 0x4f, 0x6c, 0x6a, 0x5a, 0x3d, 0x5d, 0x04, 0x5b, 0x30, 0xaa,
  2897. 0x0a, 0x7f, 0xf3, 0x80, 0xbf, 0x38, 0xe4, 0x71, 0xff, 0x45, 0x12, 0x0a, 0x7e, 0x6d, 0xbc, 0x68,
  2898. 0xe7, 0xeb, 0x32, 0xe4, 0x24, 0xfc, 0x8b, 0xd6, 0x97, 0x1c, 0xf9, 0x4d, 0xd8, 0x4c, 0xa8, 0x09,
  2899. 0x5b, 0x83, 0xc2, 0x90, 0x50, 0xcc, 0x09, 0x82, 0x38, 0x8e, 0xf9, 0xe3, 0xeb, 0x77, 0x60, 0x29,
  2900. 0xd4, 0x84, 0x64, 0x99, 0xb7, 0xdf, 0xfc, 0xa8, 0x92, 0xa8, 0xe5, 0x9f, 0x7c, 0x79, 0x35, 0xbd,
  2901. 0x4f, 0x1e, 0xb3, 0x3d, 0xab, 0x35, 0x1b, 0xad, 0x66, 0x63, 0xb7, 0x92, 0xac, 0x2d, 0x3d, 0xf9,
  2902. 0xf2, 0x6a, 0x5e, 0x23, 0xbc, 0x21, 0x72, 0xbd, 0x05, 0xcb, 0xe1, 0xaf, 0x12, 0xad, 0x20, 0x08,
  2903. 0x4a, 0x77, 0xef, 0x1f, 0xee, 0xed, 0x34, 0xb6, 0xdb, 0x4d, 0xfd, 0xc1, 0x41, 0xbb, 0x59, 0x49,
  2904. 0xa2, 0xe7, 0xe1, 0xd2, 0xde, 0xce, 0x07, 0xad, 0xb6, 0xde, 0xd8, 0xdb, 0x69, 0xee, 0xb7, 0xf5,
  2905. 0xed, 0x76, 0x7b, 0xbb, 0xb1, 0x5b, 0x49, 0x6d, 0xfd, 0x5e, 0x81, 0xf2, 0x76, 0xbd, 0xb1, 0xc3,
  2906. 0xaa, 0x9f, 0xd9, 0xc5, 0xfc, 0xac, 0xdc, 0x80, 0x0c, 0x3f, 0x0d, 0x9f, 0x7b, 0xfb, 0x58, 0x3b,
  2907. 0xbf, 0x55, 0x86, 0xee, 0x41, 0x96, 0x1f, 0x94, 0xd1, 0xf9, 0xd7, 0x91, 0xb5, 0x39, 0xbd, 0x33,
  2908. 0x36, 0x19, 0x9e, 0x1e, 0xe7, 0xde, 0x4f, 0xd6, 0xce, 0x6f, 0xa5, 0x21, 0x0d, 0x94, 0x80, 0xc2,
  2909. 0xcf, 0xbf, 0xaf, 0xab, 0x2d, 0x00, 0x36, 0x68, 0x0f, 0xf2, 0xde, 0xe1, 0x68, 0xde, 0x0d, 0x62,
  2910. 0x6d, 0x6e, 0xaf, 0x8b, 0x85, 0x4b, 0x1c, 0x62, 0xcf, 0xbf, 0x0e, 0xad, 0xcd, 0x69, 0xdc, 0xa1,
  2911. 0x1d, 0xc8, 0x49, 0x5e, 0x3a, 0xe7, 0x56, 0xb0, 0x36, 0xaf, 0x77, 0xc5, 0x82, 0x16, 0x74, 0x07,
  2912. 0xe6, 0x5f, 0xf2, 0xd6, 0x16, 0xe8, 0x49, 0xa2, 0xfb, 0x00, 0xa1, 0x23, 0xeb, 0x02, 0xb7, 0xb7,
  2913. 0xb5, 0x45, 0x7a, 0x8d, 0xe8, 0x00, 0x0a, 0xfe, 0xd1, 0x64, 0xee, 0x5d, 0x6a, 0x6d, 0x7e, 0xd3,
  2914. 0x0f, 0x3d, 0x84, 0x62, 0x94, 0x93, 0x2f, 0x76, 0x43, 0x5a, 0x5b, 0xb0, 0x9b, 0xc7, 0xfc, 0x47,
  2915. 0x09, 0xfa, 0x62, 0x37, 0xa6, 0xb5, 0x05, 0x9b, 0x7b, 0xe8, 0x53, 0x58, 0x99, 0x26, 0xd0, 0x8b,
  2916. 0x5f, 0xa0, 0xd6, 0x2e, 0xd0, 0xee, 0x43, 0x43, 0x40, 0x33, 0x88, 0xf7, 0x05, 0xee, 0x53, 0x6b,
  2917. 0x17, 0xe9, 0xfe, 0xd5, 0x9b, 0x5f, 0x3d, 0x5d, 0x4b, 0x7e, 0xfd, 0x74, 0x2d, 0xf9, 0xf7, 0xa7,
  2918. 0x6b, 0xc9, 0x2f, 0x9e, 0xad, 0x25, 0xbe, 0x7e, 0xb6, 0x96, 0xf8, 0xeb, 0xb3, 0xb5, 0xc4, 0x4f,
  2919. 0xdf, 0xe8, 0x99, 0xb4, 0x3f, 0xee, 0x6c, 0x74, 0xed, 0xe1, 0x66, 0xf8, 0x8f, 0x1a, 0xb3, 0xfe,
  2920. 0x3c, 0xd2, 0xc9, 0xf1, 0xa2, 0x72, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0xe8, 0xa9,
  2921. 0x78, 0x5c, 0x22, 0x00, 0x00,
  2922. }
  2923. // Reference imports to suppress errors if they are not otherwise used.
  2924. var _ context.Context
  2925. var _ grpc.ClientConn
  2926. // This is a compile-time assertion to ensure that this generated file
  2927. // is compatible with the grpc package it is being compiled against.
  2928. const _ = grpc.SupportPackageIsVersion4
  2929. // ABCIApplicationClient is the client API for ABCIApplication service.
  2930. //
  2931. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2932. type ABCIApplicationClient interface {
  2933. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2934. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2935. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2936. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2937. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2938. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2939. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2940. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2941. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2942. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2943. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2944. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2945. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2946. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2947. }
  2948. type aBCIApplicationClient struct {
  2949. cc *grpc.ClientConn
  2950. }
  2951. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2952. return &aBCIApplicationClient{cc}
  2953. }
  2954. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2955. out := new(ResponseEcho)
  2956. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2957. if err != nil {
  2958. return nil, err
  2959. }
  2960. return out, nil
  2961. }
  2962. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2963. out := new(ResponseFlush)
  2964. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2965. if err != nil {
  2966. return nil, err
  2967. }
  2968. return out, nil
  2969. }
  2970. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2971. out := new(ResponseInfo)
  2972. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2973. if err != nil {
  2974. return nil, err
  2975. }
  2976. return out, nil
  2977. }
  2978. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2979. out := new(ResponseDeliverTx)
  2980. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2981. if err != nil {
  2982. return nil, err
  2983. }
  2984. return out, nil
  2985. }
  2986. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2987. out := new(ResponseCheckTx)
  2988. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2989. if err != nil {
  2990. return nil, err
  2991. }
  2992. return out, nil
  2993. }
  2994. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  2995. out := new(ResponseQuery)
  2996. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  2997. if err != nil {
  2998. return nil, err
  2999. }
  3000. return out, nil
  3001. }
  3002. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  3003. out := new(ResponseCommit)
  3004. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  3005. if err != nil {
  3006. return nil, err
  3007. }
  3008. return out, nil
  3009. }
  3010. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  3011. out := new(ResponseInitChain)
  3012. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  3013. if err != nil {
  3014. return nil, err
  3015. }
  3016. return out, nil
  3017. }
  3018. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  3019. out := new(ResponseBeginBlock)
  3020. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  3021. if err != nil {
  3022. return nil, err
  3023. }
  3024. return out, nil
  3025. }
  3026. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  3027. out := new(ResponseEndBlock)
  3028. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  3029. if err != nil {
  3030. return nil, err
  3031. }
  3032. return out, nil
  3033. }
  3034. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  3035. out := new(ResponseListSnapshots)
  3036. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  3037. if err != nil {
  3038. return nil, err
  3039. }
  3040. return out, nil
  3041. }
  3042. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  3043. out := new(ResponseOfferSnapshot)
  3044. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  3045. if err != nil {
  3046. return nil, err
  3047. }
  3048. return out, nil
  3049. }
  3050. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  3051. out := new(ResponseLoadSnapshotChunk)
  3052. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  3053. if err != nil {
  3054. return nil, err
  3055. }
  3056. return out, nil
  3057. }
  3058. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  3059. out := new(ResponseApplySnapshotChunk)
  3060. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  3061. if err != nil {
  3062. return nil, err
  3063. }
  3064. return out, nil
  3065. }
  3066. // ABCIApplicationServer is the server API for ABCIApplication service.
  3067. type ABCIApplicationServer interface {
  3068. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  3069. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  3070. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  3071. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  3072. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  3073. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  3074. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  3075. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  3076. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  3077. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  3078. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  3079. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  3080. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  3081. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  3082. }
  3083. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  3084. type UnimplementedABCIApplicationServer struct {
  3085. }
  3086. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3087. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3088. }
  3089. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3090. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3091. }
  3092. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3093. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3094. }
  3095. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3096. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3097. }
  3098. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3099. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3100. }
  3101. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3102. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3103. }
  3104. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3105. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3106. }
  3107. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3108. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3109. }
  3110. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3111. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3112. }
  3113. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3114. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3115. }
  3116. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3117. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3118. }
  3119. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3120. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3121. }
  3122. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3123. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3124. }
  3125. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3126. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3127. }
  3128. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3129. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3130. }
  3131. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3132. in := new(RequestEcho)
  3133. if err := dec(in); err != nil {
  3134. return nil, err
  3135. }
  3136. if interceptor == nil {
  3137. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3138. }
  3139. info := &grpc.UnaryServerInfo{
  3140. Server: srv,
  3141. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3142. }
  3143. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3144. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3145. }
  3146. return interceptor(ctx, in, info, handler)
  3147. }
  3148. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3149. in := new(RequestFlush)
  3150. if err := dec(in); err != nil {
  3151. return nil, err
  3152. }
  3153. if interceptor == nil {
  3154. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3155. }
  3156. info := &grpc.UnaryServerInfo{
  3157. Server: srv,
  3158. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3159. }
  3160. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3161. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3162. }
  3163. return interceptor(ctx, in, info, handler)
  3164. }
  3165. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3166. in := new(RequestInfo)
  3167. if err := dec(in); err != nil {
  3168. return nil, err
  3169. }
  3170. if interceptor == nil {
  3171. return srv.(ABCIApplicationServer).Info(ctx, in)
  3172. }
  3173. info := &grpc.UnaryServerInfo{
  3174. Server: srv,
  3175. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3176. }
  3177. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3178. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3179. }
  3180. return interceptor(ctx, in, info, handler)
  3181. }
  3182. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3183. in := new(RequestDeliverTx)
  3184. if err := dec(in); err != nil {
  3185. return nil, err
  3186. }
  3187. if interceptor == nil {
  3188. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3189. }
  3190. info := &grpc.UnaryServerInfo{
  3191. Server: srv,
  3192. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3193. }
  3194. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3195. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3196. }
  3197. return interceptor(ctx, in, info, handler)
  3198. }
  3199. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3200. in := new(RequestCheckTx)
  3201. if err := dec(in); err != nil {
  3202. return nil, err
  3203. }
  3204. if interceptor == nil {
  3205. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3206. }
  3207. info := &grpc.UnaryServerInfo{
  3208. Server: srv,
  3209. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3210. }
  3211. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3212. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3213. }
  3214. return interceptor(ctx, in, info, handler)
  3215. }
  3216. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3217. in := new(RequestQuery)
  3218. if err := dec(in); err != nil {
  3219. return nil, err
  3220. }
  3221. if interceptor == nil {
  3222. return srv.(ABCIApplicationServer).Query(ctx, in)
  3223. }
  3224. info := &grpc.UnaryServerInfo{
  3225. Server: srv,
  3226. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3227. }
  3228. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3229. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3230. }
  3231. return interceptor(ctx, in, info, handler)
  3232. }
  3233. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3234. in := new(RequestCommit)
  3235. if err := dec(in); err != nil {
  3236. return nil, err
  3237. }
  3238. if interceptor == nil {
  3239. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3240. }
  3241. info := &grpc.UnaryServerInfo{
  3242. Server: srv,
  3243. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3244. }
  3245. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3246. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3247. }
  3248. return interceptor(ctx, in, info, handler)
  3249. }
  3250. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3251. in := new(RequestInitChain)
  3252. if err := dec(in); err != nil {
  3253. return nil, err
  3254. }
  3255. if interceptor == nil {
  3256. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3257. }
  3258. info := &grpc.UnaryServerInfo{
  3259. Server: srv,
  3260. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3261. }
  3262. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3263. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3264. }
  3265. return interceptor(ctx, in, info, handler)
  3266. }
  3267. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3268. in := new(RequestBeginBlock)
  3269. if err := dec(in); err != nil {
  3270. return nil, err
  3271. }
  3272. if interceptor == nil {
  3273. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3274. }
  3275. info := &grpc.UnaryServerInfo{
  3276. Server: srv,
  3277. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3278. }
  3279. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3280. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3281. }
  3282. return interceptor(ctx, in, info, handler)
  3283. }
  3284. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3285. in := new(RequestEndBlock)
  3286. if err := dec(in); err != nil {
  3287. return nil, err
  3288. }
  3289. if interceptor == nil {
  3290. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3291. }
  3292. info := &grpc.UnaryServerInfo{
  3293. Server: srv,
  3294. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3295. }
  3296. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3297. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3298. }
  3299. return interceptor(ctx, in, info, handler)
  3300. }
  3301. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3302. in := new(RequestListSnapshots)
  3303. if err := dec(in); err != nil {
  3304. return nil, err
  3305. }
  3306. if interceptor == nil {
  3307. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3308. }
  3309. info := &grpc.UnaryServerInfo{
  3310. Server: srv,
  3311. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3312. }
  3313. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3314. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3315. }
  3316. return interceptor(ctx, in, info, handler)
  3317. }
  3318. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3319. in := new(RequestOfferSnapshot)
  3320. if err := dec(in); err != nil {
  3321. return nil, err
  3322. }
  3323. if interceptor == nil {
  3324. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3325. }
  3326. info := &grpc.UnaryServerInfo{
  3327. Server: srv,
  3328. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3329. }
  3330. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3331. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3332. }
  3333. return interceptor(ctx, in, info, handler)
  3334. }
  3335. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3336. in := new(RequestLoadSnapshotChunk)
  3337. if err := dec(in); err != nil {
  3338. return nil, err
  3339. }
  3340. if interceptor == nil {
  3341. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3342. }
  3343. info := &grpc.UnaryServerInfo{
  3344. Server: srv,
  3345. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3346. }
  3347. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3348. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3349. }
  3350. return interceptor(ctx, in, info, handler)
  3351. }
  3352. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3353. in := new(RequestApplySnapshotChunk)
  3354. if err := dec(in); err != nil {
  3355. return nil, err
  3356. }
  3357. if interceptor == nil {
  3358. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3359. }
  3360. info := &grpc.UnaryServerInfo{
  3361. Server: srv,
  3362. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3363. }
  3364. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3365. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3366. }
  3367. return interceptor(ctx, in, info, handler)
  3368. }
  3369. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3370. ServiceName: "tendermint.abci.ABCIApplication",
  3371. HandlerType: (*ABCIApplicationServer)(nil),
  3372. Methods: []grpc.MethodDesc{
  3373. {
  3374. MethodName: "Echo",
  3375. Handler: _ABCIApplication_Echo_Handler,
  3376. },
  3377. {
  3378. MethodName: "Flush",
  3379. Handler: _ABCIApplication_Flush_Handler,
  3380. },
  3381. {
  3382. MethodName: "Info",
  3383. Handler: _ABCIApplication_Info_Handler,
  3384. },
  3385. {
  3386. MethodName: "DeliverTx",
  3387. Handler: _ABCIApplication_DeliverTx_Handler,
  3388. },
  3389. {
  3390. MethodName: "CheckTx",
  3391. Handler: _ABCIApplication_CheckTx_Handler,
  3392. },
  3393. {
  3394. MethodName: "Query",
  3395. Handler: _ABCIApplication_Query_Handler,
  3396. },
  3397. {
  3398. MethodName: "Commit",
  3399. Handler: _ABCIApplication_Commit_Handler,
  3400. },
  3401. {
  3402. MethodName: "InitChain",
  3403. Handler: _ABCIApplication_InitChain_Handler,
  3404. },
  3405. {
  3406. MethodName: "BeginBlock",
  3407. Handler: _ABCIApplication_BeginBlock_Handler,
  3408. },
  3409. {
  3410. MethodName: "EndBlock",
  3411. Handler: _ABCIApplication_EndBlock_Handler,
  3412. },
  3413. {
  3414. MethodName: "ListSnapshots",
  3415. Handler: _ABCIApplication_ListSnapshots_Handler,
  3416. },
  3417. {
  3418. MethodName: "OfferSnapshot",
  3419. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3420. },
  3421. {
  3422. MethodName: "LoadSnapshotChunk",
  3423. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3424. },
  3425. {
  3426. MethodName: "ApplySnapshotChunk",
  3427. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3428. },
  3429. },
  3430. Streams: []grpc.StreamDesc{},
  3431. Metadata: "tendermint/abci/types.proto",
  3432. }
  3433. func (m *Request) Marshal() (dAtA []byte, err error) {
  3434. size := m.Size()
  3435. dAtA = make([]byte, size)
  3436. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3437. if err != nil {
  3438. return nil, err
  3439. }
  3440. return dAtA[:n], nil
  3441. }
  3442. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3443. size := m.Size()
  3444. return m.MarshalToSizedBuffer(dAtA[:size])
  3445. }
  3446. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3447. i := len(dAtA)
  3448. _ = i
  3449. var l int
  3450. _ = l
  3451. if m.Value != nil {
  3452. {
  3453. size := m.Value.Size()
  3454. i -= size
  3455. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3456. return 0, err
  3457. }
  3458. }
  3459. }
  3460. return len(dAtA) - i, nil
  3461. }
  3462. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3463. size := m.Size()
  3464. return m.MarshalToSizedBuffer(dAtA[:size])
  3465. }
  3466. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3467. i := len(dAtA)
  3468. if m.Echo != nil {
  3469. {
  3470. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3471. if err != nil {
  3472. return 0, err
  3473. }
  3474. i -= size
  3475. i = encodeVarintTypes(dAtA, i, uint64(size))
  3476. }
  3477. i--
  3478. dAtA[i] = 0xa
  3479. }
  3480. return len(dAtA) - i, nil
  3481. }
  3482. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3483. size := m.Size()
  3484. return m.MarshalToSizedBuffer(dAtA[:size])
  3485. }
  3486. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3487. i := len(dAtA)
  3488. if m.Flush != nil {
  3489. {
  3490. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3491. if err != nil {
  3492. return 0, err
  3493. }
  3494. i -= size
  3495. i = encodeVarintTypes(dAtA, i, uint64(size))
  3496. }
  3497. i--
  3498. dAtA[i] = 0x12
  3499. }
  3500. return len(dAtA) - i, nil
  3501. }
  3502. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3503. size := m.Size()
  3504. return m.MarshalToSizedBuffer(dAtA[:size])
  3505. }
  3506. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3507. i := len(dAtA)
  3508. if m.Info != nil {
  3509. {
  3510. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3511. if err != nil {
  3512. return 0, err
  3513. }
  3514. i -= size
  3515. i = encodeVarintTypes(dAtA, i, uint64(size))
  3516. }
  3517. i--
  3518. dAtA[i] = 0x1a
  3519. }
  3520. return len(dAtA) - i, nil
  3521. }
  3522. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3523. size := m.Size()
  3524. return m.MarshalToSizedBuffer(dAtA[:size])
  3525. }
  3526. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3527. i := len(dAtA)
  3528. if m.InitChain != nil {
  3529. {
  3530. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3531. if err != nil {
  3532. return 0, err
  3533. }
  3534. i -= size
  3535. i = encodeVarintTypes(dAtA, i, uint64(size))
  3536. }
  3537. i--
  3538. dAtA[i] = 0x22
  3539. }
  3540. return len(dAtA) - i, nil
  3541. }
  3542. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3543. size := m.Size()
  3544. return m.MarshalToSizedBuffer(dAtA[:size])
  3545. }
  3546. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3547. i := len(dAtA)
  3548. if m.Query != nil {
  3549. {
  3550. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3551. if err != nil {
  3552. return 0, err
  3553. }
  3554. i -= size
  3555. i = encodeVarintTypes(dAtA, i, uint64(size))
  3556. }
  3557. i--
  3558. dAtA[i] = 0x2a
  3559. }
  3560. return len(dAtA) - i, nil
  3561. }
  3562. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3563. size := m.Size()
  3564. return m.MarshalToSizedBuffer(dAtA[:size])
  3565. }
  3566. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3567. i := len(dAtA)
  3568. if m.BeginBlock != nil {
  3569. {
  3570. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3571. if err != nil {
  3572. return 0, err
  3573. }
  3574. i -= size
  3575. i = encodeVarintTypes(dAtA, i, uint64(size))
  3576. }
  3577. i--
  3578. dAtA[i] = 0x32
  3579. }
  3580. return len(dAtA) - i, nil
  3581. }
  3582. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3583. size := m.Size()
  3584. return m.MarshalToSizedBuffer(dAtA[:size])
  3585. }
  3586. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3587. i := len(dAtA)
  3588. if m.CheckTx != nil {
  3589. {
  3590. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3591. if err != nil {
  3592. return 0, err
  3593. }
  3594. i -= size
  3595. i = encodeVarintTypes(dAtA, i, uint64(size))
  3596. }
  3597. i--
  3598. dAtA[i] = 0x3a
  3599. }
  3600. return len(dAtA) - i, nil
  3601. }
  3602. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3603. size := m.Size()
  3604. return m.MarshalToSizedBuffer(dAtA[:size])
  3605. }
  3606. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3607. i := len(dAtA)
  3608. if m.DeliverTx != nil {
  3609. {
  3610. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3611. if err != nil {
  3612. return 0, err
  3613. }
  3614. i -= size
  3615. i = encodeVarintTypes(dAtA, i, uint64(size))
  3616. }
  3617. i--
  3618. dAtA[i] = 0x42
  3619. }
  3620. return len(dAtA) - i, nil
  3621. }
  3622. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3623. size := m.Size()
  3624. return m.MarshalToSizedBuffer(dAtA[:size])
  3625. }
  3626. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3627. i := len(dAtA)
  3628. if m.EndBlock != nil {
  3629. {
  3630. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3631. if err != nil {
  3632. return 0, err
  3633. }
  3634. i -= size
  3635. i = encodeVarintTypes(dAtA, i, uint64(size))
  3636. }
  3637. i--
  3638. dAtA[i] = 0x4a
  3639. }
  3640. return len(dAtA) - i, nil
  3641. }
  3642. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3643. size := m.Size()
  3644. return m.MarshalToSizedBuffer(dAtA[:size])
  3645. }
  3646. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3647. i := len(dAtA)
  3648. if m.Commit != nil {
  3649. {
  3650. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3651. if err != nil {
  3652. return 0, err
  3653. }
  3654. i -= size
  3655. i = encodeVarintTypes(dAtA, i, uint64(size))
  3656. }
  3657. i--
  3658. dAtA[i] = 0x52
  3659. }
  3660. return len(dAtA) - i, nil
  3661. }
  3662. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3663. size := m.Size()
  3664. return m.MarshalToSizedBuffer(dAtA[:size])
  3665. }
  3666. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3667. i := len(dAtA)
  3668. if m.ListSnapshots != nil {
  3669. {
  3670. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3671. if err != nil {
  3672. return 0, err
  3673. }
  3674. i -= size
  3675. i = encodeVarintTypes(dAtA, i, uint64(size))
  3676. }
  3677. i--
  3678. dAtA[i] = 0x5a
  3679. }
  3680. return len(dAtA) - i, nil
  3681. }
  3682. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3683. size := m.Size()
  3684. return m.MarshalToSizedBuffer(dAtA[:size])
  3685. }
  3686. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3687. i := len(dAtA)
  3688. if m.OfferSnapshot != nil {
  3689. {
  3690. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3691. if err != nil {
  3692. return 0, err
  3693. }
  3694. i -= size
  3695. i = encodeVarintTypes(dAtA, i, uint64(size))
  3696. }
  3697. i--
  3698. dAtA[i] = 0x62
  3699. }
  3700. return len(dAtA) - i, nil
  3701. }
  3702. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3703. size := m.Size()
  3704. return m.MarshalToSizedBuffer(dAtA[:size])
  3705. }
  3706. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3707. i := len(dAtA)
  3708. if m.LoadSnapshotChunk != nil {
  3709. {
  3710. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3711. if err != nil {
  3712. return 0, err
  3713. }
  3714. i -= size
  3715. i = encodeVarintTypes(dAtA, i, uint64(size))
  3716. }
  3717. i--
  3718. dAtA[i] = 0x6a
  3719. }
  3720. return len(dAtA) - i, nil
  3721. }
  3722. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3723. size := m.Size()
  3724. return m.MarshalToSizedBuffer(dAtA[:size])
  3725. }
  3726. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3727. i := len(dAtA)
  3728. if m.ApplySnapshotChunk != nil {
  3729. {
  3730. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3731. if err != nil {
  3732. return 0, err
  3733. }
  3734. i -= size
  3735. i = encodeVarintTypes(dAtA, i, uint64(size))
  3736. }
  3737. i--
  3738. dAtA[i] = 0x72
  3739. }
  3740. return len(dAtA) - i, nil
  3741. }
  3742. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3743. size := m.Size()
  3744. dAtA = make([]byte, size)
  3745. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3746. if err != nil {
  3747. return nil, err
  3748. }
  3749. return dAtA[:n], nil
  3750. }
  3751. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3752. size := m.Size()
  3753. return m.MarshalToSizedBuffer(dAtA[:size])
  3754. }
  3755. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3756. i := len(dAtA)
  3757. _ = i
  3758. var l int
  3759. _ = l
  3760. if len(m.Message) > 0 {
  3761. i -= len(m.Message)
  3762. copy(dAtA[i:], m.Message)
  3763. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3764. i--
  3765. dAtA[i] = 0xa
  3766. }
  3767. return len(dAtA) - i, nil
  3768. }
  3769. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3770. size := m.Size()
  3771. dAtA = make([]byte, size)
  3772. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3773. if err != nil {
  3774. return nil, err
  3775. }
  3776. return dAtA[:n], nil
  3777. }
  3778. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3779. size := m.Size()
  3780. return m.MarshalToSizedBuffer(dAtA[:size])
  3781. }
  3782. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3783. i := len(dAtA)
  3784. _ = i
  3785. var l int
  3786. _ = l
  3787. return len(dAtA) - i, nil
  3788. }
  3789. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3790. size := m.Size()
  3791. dAtA = make([]byte, size)
  3792. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3793. if err != nil {
  3794. return nil, err
  3795. }
  3796. return dAtA[:n], nil
  3797. }
  3798. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3799. size := m.Size()
  3800. return m.MarshalToSizedBuffer(dAtA[:size])
  3801. }
  3802. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3803. i := len(dAtA)
  3804. _ = i
  3805. var l int
  3806. _ = l
  3807. if m.P2PVersion != 0 {
  3808. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3809. i--
  3810. dAtA[i] = 0x18
  3811. }
  3812. if m.BlockVersion != 0 {
  3813. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3814. i--
  3815. dAtA[i] = 0x10
  3816. }
  3817. if len(m.Version) > 0 {
  3818. i -= len(m.Version)
  3819. copy(dAtA[i:], m.Version)
  3820. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3821. i--
  3822. dAtA[i] = 0xa
  3823. }
  3824. return len(dAtA) - i, nil
  3825. }
  3826. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3827. size := m.Size()
  3828. dAtA = make([]byte, size)
  3829. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3830. if err != nil {
  3831. return nil, err
  3832. }
  3833. return dAtA[:n], nil
  3834. }
  3835. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3836. size := m.Size()
  3837. return m.MarshalToSizedBuffer(dAtA[:size])
  3838. }
  3839. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3840. i := len(dAtA)
  3841. _ = i
  3842. var l int
  3843. _ = l
  3844. if m.InitialHeight != 0 {
  3845. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3846. i--
  3847. dAtA[i] = 0x30
  3848. }
  3849. if len(m.AppStateBytes) > 0 {
  3850. i -= len(m.AppStateBytes)
  3851. copy(dAtA[i:], m.AppStateBytes)
  3852. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3853. i--
  3854. dAtA[i] = 0x2a
  3855. }
  3856. if len(m.Validators) > 0 {
  3857. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3858. {
  3859. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3860. if err != nil {
  3861. return 0, err
  3862. }
  3863. i -= size
  3864. i = encodeVarintTypes(dAtA, i, uint64(size))
  3865. }
  3866. i--
  3867. dAtA[i] = 0x22
  3868. }
  3869. }
  3870. if m.ConsensusParams != nil {
  3871. {
  3872. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3873. if err != nil {
  3874. return 0, err
  3875. }
  3876. i -= size
  3877. i = encodeVarintTypes(dAtA, i, uint64(size))
  3878. }
  3879. i--
  3880. dAtA[i] = 0x1a
  3881. }
  3882. if len(m.ChainId) > 0 {
  3883. i -= len(m.ChainId)
  3884. copy(dAtA[i:], m.ChainId)
  3885. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3886. i--
  3887. dAtA[i] = 0x12
  3888. }
  3889. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3890. if err16 != nil {
  3891. return 0, err16
  3892. }
  3893. i -= n16
  3894. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3895. i--
  3896. dAtA[i] = 0xa
  3897. return len(dAtA) - i, nil
  3898. }
  3899. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3900. size := m.Size()
  3901. dAtA = make([]byte, size)
  3902. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3903. if err != nil {
  3904. return nil, err
  3905. }
  3906. return dAtA[:n], nil
  3907. }
  3908. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3909. size := m.Size()
  3910. return m.MarshalToSizedBuffer(dAtA[:size])
  3911. }
  3912. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3913. i := len(dAtA)
  3914. _ = i
  3915. var l int
  3916. _ = l
  3917. if m.Prove {
  3918. i--
  3919. if m.Prove {
  3920. dAtA[i] = 1
  3921. } else {
  3922. dAtA[i] = 0
  3923. }
  3924. i--
  3925. dAtA[i] = 0x20
  3926. }
  3927. if m.Height != 0 {
  3928. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3929. i--
  3930. dAtA[i] = 0x18
  3931. }
  3932. if len(m.Path) > 0 {
  3933. i -= len(m.Path)
  3934. copy(dAtA[i:], m.Path)
  3935. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3936. i--
  3937. dAtA[i] = 0x12
  3938. }
  3939. if len(m.Data) > 0 {
  3940. i -= len(m.Data)
  3941. copy(dAtA[i:], m.Data)
  3942. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3943. i--
  3944. dAtA[i] = 0xa
  3945. }
  3946. return len(dAtA) - i, nil
  3947. }
  3948. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3949. size := m.Size()
  3950. dAtA = make([]byte, size)
  3951. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3952. if err != nil {
  3953. return nil, err
  3954. }
  3955. return dAtA[:n], nil
  3956. }
  3957. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3958. size := m.Size()
  3959. return m.MarshalToSizedBuffer(dAtA[:size])
  3960. }
  3961. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3962. i := len(dAtA)
  3963. _ = i
  3964. var l int
  3965. _ = l
  3966. if len(m.ByzantineValidators) > 0 {
  3967. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3968. {
  3969. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3970. if err != nil {
  3971. return 0, err
  3972. }
  3973. i -= size
  3974. i = encodeVarintTypes(dAtA, i, uint64(size))
  3975. }
  3976. i--
  3977. dAtA[i] = 0x22
  3978. }
  3979. }
  3980. {
  3981. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3982. if err != nil {
  3983. return 0, err
  3984. }
  3985. i -= size
  3986. i = encodeVarintTypes(dAtA, i, uint64(size))
  3987. }
  3988. i--
  3989. dAtA[i] = 0x1a
  3990. {
  3991. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  3992. if err != nil {
  3993. return 0, err
  3994. }
  3995. i -= size
  3996. i = encodeVarintTypes(dAtA, i, uint64(size))
  3997. }
  3998. i--
  3999. dAtA[i] = 0x12
  4000. if len(m.Hash) > 0 {
  4001. i -= len(m.Hash)
  4002. copy(dAtA[i:], m.Hash)
  4003. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  4004. i--
  4005. dAtA[i] = 0xa
  4006. }
  4007. return len(dAtA) - i, nil
  4008. }
  4009. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  4010. size := m.Size()
  4011. dAtA = make([]byte, size)
  4012. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4013. if err != nil {
  4014. return nil, err
  4015. }
  4016. return dAtA[:n], nil
  4017. }
  4018. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4019. size := m.Size()
  4020. return m.MarshalToSizedBuffer(dAtA[:size])
  4021. }
  4022. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4023. i := len(dAtA)
  4024. _ = i
  4025. var l int
  4026. _ = l
  4027. if m.Type != 0 {
  4028. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  4029. i--
  4030. dAtA[i] = 0x10
  4031. }
  4032. if len(m.Tx) > 0 {
  4033. i -= len(m.Tx)
  4034. copy(dAtA[i:], m.Tx)
  4035. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4036. i--
  4037. dAtA[i] = 0xa
  4038. }
  4039. return len(dAtA) - i, nil
  4040. }
  4041. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  4042. size := m.Size()
  4043. dAtA = make([]byte, size)
  4044. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4045. if err != nil {
  4046. return nil, err
  4047. }
  4048. return dAtA[:n], nil
  4049. }
  4050. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4051. size := m.Size()
  4052. return m.MarshalToSizedBuffer(dAtA[:size])
  4053. }
  4054. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4055. i := len(dAtA)
  4056. _ = i
  4057. var l int
  4058. _ = l
  4059. if len(m.Tx) > 0 {
  4060. i -= len(m.Tx)
  4061. copy(dAtA[i:], m.Tx)
  4062. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  4063. i--
  4064. dAtA[i] = 0xa
  4065. }
  4066. return len(dAtA) - i, nil
  4067. }
  4068. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  4069. size := m.Size()
  4070. dAtA = make([]byte, size)
  4071. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4072. if err != nil {
  4073. return nil, err
  4074. }
  4075. return dAtA[:n], nil
  4076. }
  4077. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4078. size := m.Size()
  4079. return m.MarshalToSizedBuffer(dAtA[:size])
  4080. }
  4081. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4082. i := len(dAtA)
  4083. _ = i
  4084. var l int
  4085. _ = l
  4086. if m.Height != 0 {
  4087. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4088. i--
  4089. dAtA[i] = 0x8
  4090. }
  4091. return len(dAtA) - i, nil
  4092. }
  4093. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4094. size := m.Size()
  4095. dAtA = make([]byte, size)
  4096. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4097. if err != nil {
  4098. return nil, err
  4099. }
  4100. return dAtA[:n], nil
  4101. }
  4102. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4103. size := m.Size()
  4104. return m.MarshalToSizedBuffer(dAtA[:size])
  4105. }
  4106. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4107. i := len(dAtA)
  4108. _ = i
  4109. var l int
  4110. _ = l
  4111. return len(dAtA) - i, nil
  4112. }
  4113. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4114. size := m.Size()
  4115. dAtA = make([]byte, size)
  4116. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4117. if err != nil {
  4118. return nil, err
  4119. }
  4120. return dAtA[:n], nil
  4121. }
  4122. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4123. size := m.Size()
  4124. return m.MarshalToSizedBuffer(dAtA[:size])
  4125. }
  4126. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4127. i := len(dAtA)
  4128. _ = i
  4129. var l int
  4130. _ = l
  4131. return len(dAtA) - i, nil
  4132. }
  4133. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4134. size := m.Size()
  4135. dAtA = make([]byte, size)
  4136. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4137. if err != nil {
  4138. return nil, err
  4139. }
  4140. return dAtA[:n], nil
  4141. }
  4142. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4143. size := m.Size()
  4144. return m.MarshalToSizedBuffer(dAtA[:size])
  4145. }
  4146. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4147. i := len(dAtA)
  4148. _ = i
  4149. var l int
  4150. _ = l
  4151. if len(m.AppHash) > 0 {
  4152. i -= len(m.AppHash)
  4153. copy(dAtA[i:], m.AppHash)
  4154. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4155. i--
  4156. dAtA[i] = 0x12
  4157. }
  4158. if m.Snapshot != nil {
  4159. {
  4160. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4161. if err != nil {
  4162. return 0, err
  4163. }
  4164. i -= size
  4165. i = encodeVarintTypes(dAtA, i, uint64(size))
  4166. }
  4167. i--
  4168. dAtA[i] = 0xa
  4169. }
  4170. return len(dAtA) - i, nil
  4171. }
  4172. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4173. size := m.Size()
  4174. dAtA = make([]byte, size)
  4175. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4176. if err != nil {
  4177. return nil, err
  4178. }
  4179. return dAtA[:n], nil
  4180. }
  4181. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4182. size := m.Size()
  4183. return m.MarshalToSizedBuffer(dAtA[:size])
  4184. }
  4185. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4186. i := len(dAtA)
  4187. _ = i
  4188. var l int
  4189. _ = l
  4190. if m.Chunk != 0 {
  4191. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4192. i--
  4193. dAtA[i] = 0x18
  4194. }
  4195. if m.Format != 0 {
  4196. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4197. i--
  4198. dAtA[i] = 0x10
  4199. }
  4200. if m.Height != 0 {
  4201. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4202. i--
  4203. dAtA[i] = 0x8
  4204. }
  4205. return len(dAtA) - i, nil
  4206. }
  4207. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4208. size := m.Size()
  4209. dAtA = make([]byte, size)
  4210. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4211. if err != nil {
  4212. return nil, err
  4213. }
  4214. return dAtA[:n], nil
  4215. }
  4216. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4217. size := m.Size()
  4218. return m.MarshalToSizedBuffer(dAtA[:size])
  4219. }
  4220. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4221. i := len(dAtA)
  4222. _ = i
  4223. var l int
  4224. _ = l
  4225. if len(m.Sender) > 0 {
  4226. i -= len(m.Sender)
  4227. copy(dAtA[i:], m.Sender)
  4228. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4229. i--
  4230. dAtA[i] = 0x1a
  4231. }
  4232. if len(m.Chunk) > 0 {
  4233. i -= len(m.Chunk)
  4234. copy(dAtA[i:], m.Chunk)
  4235. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4236. i--
  4237. dAtA[i] = 0x12
  4238. }
  4239. if m.Index != 0 {
  4240. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4241. i--
  4242. dAtA[i] = 0x8
  4243. }
  4244. return len(dAtA) - i, nil
  4245. }
  4246. func (m *Response) Marshal() (dAtA []byte, err error) {
  4247. size := m.Size()
  4248. dAtA = make([]byte, size)
  4249. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4250. if err != nil {
  4251. return nil, err
  4252. }
  4253. return dAtA[:n], nil
  4254. }
  4255. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4256. size := m.Size()
  4257. return m.MarshalToSizedBuffer(dAtA[:size])
  4258. }
  4259. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4260. i := len(dAtA)
  4261. _ = i
  4262. var l int
  4263. _ = l
  4264. if m.Value != nil {
  4265. {
  4266. size := m.Value.Size()
  4267. i -= size
  4268. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4269. return 0, err
  4270. }
  4271. }
  4272. }
  4273. return len(dAtA) - i, nil
  4274. }
  4275. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4276. size := m.Size()
  4277. return m.MarshalToSizedBuffer(dAtA[:size])
  4278. }
  4279. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4280. i := len(dAtA)
  4281. if m.Exception != nil {
  4282. {
  4283. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4284. if err != nil {
  4285. return 0, err
  4286. }
  4287. i -= size
  4288. i = encodeVarintTypes(dAtA, i, uint64(size))
  4289. }
  4290. i--
  4291. dAtA[i] = 0xa
  4292. }
  4293. return len(dAtA) - i, nil
  4294. }
  4295. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4296. size := m.Size()
  4297. return m.MarshalToSizedBuffer(dAtA[:size])
  4298. }
  4299. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4300. i := len(dAtA)
  4301. if m.Echo != nil {
  4302. {
  4303. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4304. if err != nil {
  4305. return 0, err
  4306. }
  4307. i -= size
  4308. i = encodeVarintTypes(dAtA, i, uint64(size))
  4309. }
  4310. i--
  4311. dAtA[i] = 0x12
  4312. }
  4313. return len(dAtA) - i, nil
  4314. }
  4315. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4316. size := m.Size()
  4317. return m.MarshalToSizedBuffer(dAtA[:size])
  4318. }
  4319. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4320. i := len(dAtA)
  4321. if m.Flush != nil {
  4322. {
  4323. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4324. if err != nil {
  4325. return 0, err
  4326. }
  4327. i -= size
  4328. i = encodeVarintTypes(dAtA, i, uint64(size))
  4329. }
  4330. i--
  4331. dAtA[i] = 0x1a
  4332. }
  4333. return len(dAtA) - i, nil
  4334. }
  4335. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4336. size := m.Size()
  4337. return m.MarshalToSizedBuffer(dAtA[:size])
  4338. }
  4339. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4340. i := len(dAtA)
  4341. if m.Info != nil {
  4342. {
  4343. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4344. if err != nil {
  4345. return 0, err
  4346. }
  4347. i -= size
  4348. i = encodeVarintTypes(dAtA, i, uint64(size))
  4349. }
  4350. i--
  4351. dAtA[i] = 0x22
  4352. }
  4353. return len(dAtA) - i, nil
  4354. }
  4355. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4356. size := m.Size()
  4357. return m.MarshalToSizedBuffer(dAtA[:size])
  4358. }
  4359. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4360. i := len(dAtA)
  4361. if m.InitChain != nil {
  4362. {
  4363. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4364. if err != nil {
  4365. return 0, err
  4366. }
  4367. i -= size
  4368. i = encodeVarintTypes(dAtA, i, uint64(size))
  4369. }
  4370. i--
  4371. dAtA[i] = 0x2a
  4372. }
  4373. return len(dAtA) - i, nil
  4374. }
  4375. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4376. size := m.Size()
  4377. return m.MarshalToSizedBuffer(dAtA[:size])
  4378. }
  4379. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4380. i := len(dAtA)
  4381. if m.Query != nil {
  4382. {
  4383. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4384. if err != nil {
  4385. return 0, err
  4386. }
  4387. i -= size
  4388. i = encodeVarintTypes(dAtA, i, uint64(size))
  4389. }
  4390. i--
  4391. dAtA[i] = 0x32
  4392. }
  4393. return len(dAtA) - i, nil
  4394. }
  4395. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4396. size := m.Size()
  4397. return m.MarshalToSizedBuffer(dAtA[:size])
  4398. }
  4399. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4400. i := len(dAtA)
  4401. if m.BeginBlock != nil {
  4402. {
  4403. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4404. if err != nil {
  4405. return 0, err
  4406. }
  4407. i -= size
  4408. i = encodeVarintTypes(dAtA, i, uint64(size))
  4409. }
  4410. i--
  4411. dAtA[i] = 0x3a
  4412. }
  4413. return len(dAtA) - i, nil
  4414. }
  4415. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4416. size := m.Size()
  4417. return m.MarshalToSizedBuffer(dAtA[:size])
  4418. }
  4419. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4420. i := len(dAtA)
  4421. if m.CheckTx != nil {
  4422. {
  4423. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4424. if err != nil {
  4425. return 0, err
  4426. }
  4427. i -= size
  4428. i = encodeVarintTypes(dAtA, i, uint64(size))
  4429. }
  4430. i--
  4431. dAtA[i] = 0x42
  4432. }
  4433. return len(dAtA) - i, nil
  4434. }
  4435. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4436. size := m.Size()
  4437. return m.MarshalToSizedBuffer(dAtA[:size])
  4438. }
  4439. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4440. i := len(dAtA)
  4441. if m.DeliverTx != nil {
  4442. {
  4443. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4444. if err != nil {
  4445. return 0, err
  4446. }
  4447. i -= size
  4448. i = encodeVarintTypes(dAtA, i, uint64(size))
  4449. }
  4450. i--
  4451. dAtA[i] = 0x4a
  4452. }
  4453. return len(dAtA) - i, nil
  4454. }
  4455. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4456. size := m.Size()
  4457. return m.MarshalToSizedBuffer(dAtA[:size])
  4458. }
  4459. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4460. i := len(dAtA)
  4461. if m.EndBlock != nil {
  4462. {
  4463. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4464. if err != nil {
  4465. return 0, err
  4466. }
  4467. i -= size
  4468. i = encodeVarintTypes(dAtA, i, uint64(size))
  4469. }
  4470. i--
  4471. dAtA[i] = 0x52
  4472. }
  4473. return len(dAtA) - i, nil
  4474. }
  4475. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4476. size := m.Size()
  4477. return m.MarshalToSizedBuffer(dAtA[:size])
  4478. }
  4479. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4480. i := len(dAtA)
  4481. if m.Commit != nil {
  4482. {
  4483. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4484. if err != nil {
  4485. return 0, err
  4486. }
  4487. i -= size
  4488. i = encodeVarintTypes(dAtA, i, uint64(size))
  4489. }
  4490. i--
  4491. dAtA[i] = 0x5a
  4492. }
  4493. return len(dAtA) - i, nil
  4494. }
  4495. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4496. size := m.Size()
  4497. return m.MarshalToSizedBuffer(dAtA[:size])
  4498. }
  4499. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4500. i := len(dAtA)
  4501. if m.ListSnapshots != nil {
  4502. {
  4503. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4504. if err != nil {
  4505. return 0, err
  4506. }
  4507. i -= size
  4508. i = encodeVarintTypes(dAtA, i, uint64(size))
  4509. }
  4510. i--
  4511. dAtA[i] = 0x62
  4512. }
  4513. return len(dAtA) - i, nil
  4514. }
  4515. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4516. size := m.Size()
  4517. return m.MarshalToSizedBuffer(dAtA[:size])
  4518. }
  4519. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4520. i := len(dAtA)
  4521. if m.OfferSnapshot != nil {
  4522. {
  4523. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4524. if err != nil {
  4525. return 0, err
  4526. }
  4527. i -= size
  4528. i = encodeVarintTypes(dAtA, i, uint64(size))
  4529. }
  4530. i--
  4531. dAtA[i] = 0x6a
  4532. }
  4533. return len(dAtA) - i, nil
  4534. }
  4535. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4536. size := m.Size()
  4537. return m.MarshalToSizedBuffer(dAtA[:size])
  4538. }
  4539. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4540. i := len(dAtA)
  4541. if m.LoadSnapshotChunk != nil {
  4542. {
  4543. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4544. if err != nil {
  4545. return 0, err
  4546. }
  4547. i -= size
  4548. i = encodeVarintTypes(dAtA, i, uint64(size))
  4549. }
  4550. i--
  4551. dAtA[i] = 0x72
  4552. }
  4553. return len(dAtA) - i, nil
  4554. }
  4555. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4556. size := m.Size()
  4557. return m.MarshalToSizedBuffer(dAtA[:size])
  4558. }
  4559. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4560. i := len(dAtA)
  4561. if m.ApplySnapshotChunk != nil {
  4562. {
  4563. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4564. if err != nil {
  4565. return 0, err
  4566. }
  4567. i -= size
  4568. i = encodeVarintTypes(dAtA, i, uint64(size))
  4569. }
  4570. i--
  4571. dAtA[i] = 0x7a
  4572. }
  4573. return len(dAtA) - i, nil
  4574. }
  4575. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4576. size := m.Size()
  4577. dAtA = make([]byte, size)
  4578. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4579. if err != nil {
  4580. return nil, err
  4581. }
  4582. return dAtA[:n], nil
  4583. }
  4584. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4585. size := m.Size()
  4586. return m.MarshalToSizedBuffer(dAtA[:size])
  4587. }
  4588. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4589. i := len(dAtA)
  4590. _ = i
  4591. var l int
  4592. _ = l
  4593. if len(m.Error) > 0 {
  4594. i -= len(m.Error)
  4595. copy(dAtA[i:], m.Error)
  4596. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4597. i--
  4598. dAtA[i] = 0xa
  4599. }
  4600. return len(dAtA) - i, nil
  4601. }
  4602. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4603. size := m.Size()
  4604. dAtA = make([]byte, size)
  4605. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4606. if err != nil {
  4607. return nil, err
  4608. }
  4609. return dAtA[:n], nil
  4610. }
  4611. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4612. size := m.Size()
  4613. return m.MarshalToSizedBuffer(dAtA[:size])
  4614. }
  4615. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4616. i := len(dAtA)
  4617. _ = i
  4618. var l int
  4619. _ = l
  4620. if len(m.Message) > 0 {
  4621. i -= len(m.Message)
  4622. copy(dAtA[i:], m.Message)
  4623. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4624. i--
  4625. dAtA[i] = 0xa
  4626. }
  4627. return len(dAtA) - i, nil
  4628. }
  4629. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4630. size := m.Size()
  4631. dAtA = make([]byte, size)
  4632. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4633. if err != nil {
  4634. return nil, err
  4635. }
  4636. return dAtA[:n], nil
  4637. }
  4638. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4639. size := m.Size()
  4640. return m.MarshalToSizedBuffer(dAtA[:size])
  4641. }
  4642. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4643. i := len(dAtA)
  4644. _ = i
  4645. var l int
  4646. _ = l
  4647. return len(dAtA) - i, nil
  4648. }
  4649. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4650. size := m.Size()
  4651. dAtA = make([]byte, size)
  4652. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4653. if err != nil {
  4654. return nil, err
  4655. }
  4656. return dAtA[:n], nil
  4657. }
  4658. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4659. size := m.Size()
  4660. return m.MarshalToSizedBuffer(dAtA[:size])
  4661. }
  4662. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4663. i := len(dAtA)
  4664. _ = i
  4665. var l int
  4666. _ = l
  4667. if len(m.LastBlockAppHash) > 0 {
  4668. i -= len(m.LastBlockAppHash)
  4669. copy(dAtA[i:], m.LastBlockAppHash)
  4670. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4671. i--
  4672. dAtA[i] = 0x2a
  4673. }
  4674. if m.LastBlockHeight != 0 {
  4675. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4676. i--
  4677. dAtA[i] = 0x20
  4678. }
  4679. if m.AppVersion != 0 {
  4680. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4681. i--
  4682. dAtA[i] = 0x18
  4683. }
  4684. if len(m.Version) > 0 {
  4685. i -= len(m.Version)
  4686. copy(dAtA[i:], m.Version)
  4687. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4688. i--
  4689. dAtA[i] = 0x12
  4690. }
  4691. if len(m.Data) > 0 {
  4692. i -= len(m.Data)
  4693. copy(dAtA[i:], m.Data)
  4694. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4695. i--
  4696. dAtA[i] = 0xa
  4697. }
  4698. return len(dAtA) - i, nil
  4699. }
  4700. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4701. size := m.Size()
  4702. dAtA = make([]byte, size)
  4703. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4704. if err != nil {
  4705. return nil, err
  4706. }
  4707. return dAtA[:n], nil
  4708. }
  4709. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4710. size := m.Size()
  4711. return m.MarshalToSizedBuffer(dAtA[:size])
  4712. }
  4713. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4714. i := len(dAtA)
  4715. _ = i
  4716. var l int
  4717. _ = l
  4718. if len(m.AppHash) > 0 {
  4719. i -= len(m.AppHash)
  4720. copy(dAtA[i:], m.AppHash)
  4721. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4722. i--
  4723. dAtA[i] = 0x1a
  4724. }
  4725. if len(m.Validators) > 0 {
  4726. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4727. {
  4728. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4729. if err != nil {
  4730. return 0, err
  4731. }
  4732. i -= size
  4733. i = encodeVarintTypes(dAtA, i, uint64(size))
  4734. }
  4735. i--
  4736. dAtA[i] = 0x12
  4737. }
  4738. }
  4739. if m.ConsensusParams != nil {
  4740. {
  4741. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4742. if err != nil {
  4743. return 0, err
  4744. }
  4745. i -= size
  4746. i = encodeVarintTypes(dAtA, i, uint64(size))
  4747. }
  4748. i--
  4749. dAtA[i] = 0xa
  4750. }
  4751. return len(dAtA) - i, nil
  4752. }
  4753. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4754. size := m.Size()
  4755. dAtA = make([]byte, size)
  4756. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4757. if err != nil {
  4758. return nil, err
  4759. }
  4760. return dAtA[:n], nil
  4761. }
  4762. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4763. size := m.Size()
  4764. return m.MarshalToSizedBuffer(dAtA[:size])
  4765. }
  4766. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4767. i := len(dAtA)
  4768. _ = i
  4769. var l int
  4770. _ = l
  4771. if len(m.Codespace) > 0 {
  4772. i -= len(m.Codespace)
  4773. copy(dAtA[i:], m.Codespace)
  4774. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4775. i--
  4776. dAtA[i] = 0x52
  4777. }
  4778. if m.Height != 0 {
  4779. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4780. i--
  4781. dAtA[i] = 0x48
  4782. }
  4783. if m.ProofOps != nil {
  4784. {
  4785. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4786. if err != nil {
  4787. return 0, err
  4788. }
  4789. i -= size
  4790. i = encodeVarintTypes(dAtA, i, uint64(size))
  4791. }
  4792. i--
  4793. dAtA[i] = 0x42
  4794. }
  4795. if len(m.Value) > 0 {
  4796. i -= len(m.Value)
  4797. copy(dAtA[i:], m.Value)
  4798. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4799. i--
  4800. dAtA[i] = 0x3a
  4801. }
  4802. if len(m.Key) > 0 {
  4803. i -= len(m.Key)
  4804. copy(dAtA[i:], m.Key)
  4805. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4806. i--
  4807. dAtA[i] = 0x32
  4808. }
  4809. if m.Index != 0 {
  4810. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4811. i--
  4812. dAtA[i] = 0x28
  4813. }
  4814. if len(m.Info) > 0 {
  4815. i -= len(m.Info)
  4816. copy(dAtA[i:], m.Info)
  4817. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4818. i--
  4819. dAtA[i] = 0x22
  4820. }
  4821. if len(m.Log) > 0 {
  4822. i -= len(m.Log)
  4823. copy(dAtA[i:], m.Log)
  4824. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4825. i--
  4826. dAtA[i] = 0x1a
  4827. }
  4828. if m.Code != 0 {
  4829. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4830. i--
  4831. dAtA[i] = 0x8
  4832. }
  4833. return len(dAtA) - i, nil
  4834. }
  4835. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4836. size := m.Size()
  4837. dAtA = make([]byte, size)
  4838. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4839. if err != nil {
  4840. return nil, err
  4841. }
  4842. return dAtA[:n], nil
  4843. }
  4844. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4845. size := m.Size()
  4846. return m.MarshalToSizedBuffer(dAtA[:size])
  4847. }
  4848. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4849. i := len(dAtA)
  4850. _ = i
  4851. var l int
  4852. _ = l
  4853. if len(m.Events) > 0 {
  4854. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4855. {
  4856. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4857. if err != nil {
  4858. return 0, err
  4859. }
  4860. i -= size
  4861. i = encodeVarintTypes(dAtA, i, uint64(size))
  4862. }
  4863. i--
  4864. dAtA[i] = 0xa
  4865. }
  4866. }
  4867. return len(dAtA) - i, nil
  4868. }
  4869. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  4870. size := m.Size()
  4871. dAtA = make([]byte, size)
  4872. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4873. if err != nil {
  4874. return nil, err
  4875. }
  4876. return dAtA[:n], nil
  4877. }
  4878. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4879. size := m.Size()
  4880. return m.MarshalToSizedBuffer(dAtA[:size])
  4881. }
  4882. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4883. i := len(dAtA)
  4884. _ = i
  4885. var l int
  4886. _ = l
  4887. if len(m.Codespace) > 0 {
  4888. i -= len(m.Codespace)
  4889. copy(dAtA[i:], m.Codespace)
  4890. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4891. i--
  4892. dAtA[i] = 0x42
  4893. }
  4894. if len(m.Events) > 0 {
  4895. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4896. {
  4897. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4898. if err != nil {
  4899. return 0, err
  4900. }
  4901. i -= size
  4902. i = encodeVarintTypes(dAtA, i, uint64(size))
  4903. }
  4904. i--
  4905. dAtA[i] = 0x3a
  4906. }
  4907. }
  4908. if m.GasUsed != 0 {
  4909. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4910. i--
  4911. dAtA[i] = 0x30
  4912. }
  4913. if m.GasWanted != 0 {
  4914. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4915. i--
  4916. dAtA[i] = 0x28
  4917. }
  4918. if len(m.Info) > 0 {
  4919. i -= len(m.Info)
  4920. copy(dAtA[i:], m.Info)
  4921. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4922. i--
  4923. dAtA[i] = 0x22
  4924. }
  4925. if len(m.Log) > 0 {
  4926. i -= len(m.Log)
  4927. copy(dAtA[i:], m.Log)
  4928. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4929. i--
  4930. dAtA[i] = 0x1a
  4931. }
  4932. if len(m.Data) > 0 {
  4933. i -= len(m.Data)
  4934. copy(dAtA[i:], m.Data)
  4935. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4936. i--
  4937. dAtA[i] = 0x12
  4938. }
  4939. if m.Code != 0 {
  4940. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4941. i--
  4942. dAtA[i] = 0x8
  4943. }
  4944. return len(dAtA) - i, nil
  4945. }
  4946. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  4947. size := m.Size()
  4948. dAtA = make([]byte, size)
  4949. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4950. if err != nil {
  4951. return nil, err
  4952. }
  4953. return dAtA[:n], nil
  4954. }
  4955. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4956. size := m.Size()
  4957. return m.MarshalToSizedBuffer(dAtA[:size])
  4958. }
  4959. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4960. i := len(dAtA)
  4961. _ = i
  4962. var l int
  4963. _ = l
  4964. if len(m.Codespace) > 0 {
  4965. i -= len(m.Codespace)
  4966. copy(dAtA[i:], m.Codespace)
  4967. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4968. i--
  4969. dAtA[i] = 0x42
  4970. }
  4971. if len(m.Events) > 0 {
  4972. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4973. {
  4974. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4975. if err != nil {
  4976. return 0, err
  4977. }
  4978. i -= size
  4979. i = encodeVarintTypes(dAtA, i, uint64(size))
  4980. }
  4981. i--
  4982. dAtA[i] = 0x3a
  4983. }
  4984. }
  4985. if m.GasUsed != 0 {
  4986. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4987. i--
  4988. dAtA[i] = 0x30
  4989. }
  4990. if m.GasWanted != 0 {
  4991. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4992. i--
  4993. dAtA[i] = 0x28
  4994. }
  4995. if len(m.Info) > 0 {
  4996. i -= len(m.Info)
  4997. copy(dAtA[i:], m.Info)
  4998. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4999. i--
  5000. dAtA[i] = 0x22
  5001. }
  5002. if len(m.Log) > 0 {
  5003. i -= len(m.Log)
  5004. copy(dAtA[i:], m.Log)
  5005. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  5006. i--
  5007. dAtA[i] = 0x1a
  5008. }
  5009. if len(m.Data) > 0 {
  5010. i -= len(m.Data)
  5011. copy(dAtA[i:], m.Data)
  5012. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5013. i--
  5014. dAtA[i] = 0x12
  5015. }
  5016. if m.Code != 0 {
  5017. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  5018. i--
  5019. dAtA[i] = 0x8
  5020. }
  5021. return len(dAtA) - i, nil
  5022. }
  5023. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  5024. size := m.Size()
  5025. dAtA = make([]byte, size)
  5026. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5027. if err != nil {
  5028. return nil, err
  5029. }
  5030. return dAtA[:n], nil
  5031. }
  5032. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  5033. size := m.Size()
  5034. return m.MarshalToSizedBuffer(dAtA[:size])
  5035. }
  5036. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5037. i := len(dAtA)
  5038. _ = i
  5039. var l int
  5040. _ = l
  5041. if len(m.Events) > 0 {
  5042. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  5043. {
  5044. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5045. if err != nil {
  5046. return 0, err
  5047. }
  5048. i -= size
  5049. i = encodeVarintTypes(dAtA, i, uint64(size))
  5050. }
  5051. i--
  5052. dAtA[i] = 0x1a
  5053. }
  5054. }
  5055. if m.ConsensusParamUpdates != nil {
  5056. {
  5057. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  5058. if err != nil {
  5059. return 0, err
  5060. }
  5061. i -= size
  5062. i = encodeVarintTypes(dAtA, i, uint64(size))
  5063. }
  5064. i--
  5065. dAtA[i] = 0x12
  5066. }
  5067. if len(m.ValidatorUpdates) > 0 {
  5068. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5069. {
  5070. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5071. if err != nil {
  5072. return 0, err
  5073. }
  5074. i -= size
  5075. i = encodeVarintTypes(dAtA, i, uint64(size))
  5076. }
  5077. i--
  5078. dAtA[i] = 0xa
  5079. }
  5080. }
  5081. return len(dAtA) - i, nil
  5082. }
  5083. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5084. size := m.Size()
  5085. dAtA = make([]byte, size)
  5086. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5087. if err != nil {
  5088. return nil, err
  5089. }
  5090. return dAtA[:n], nil
  5091. }
  5092. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5093. size := m.Size()
  5094. return m.MarshalToSizedBuffer(dAtA[:size])
  5095. }
  5096. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5097. i := len(dAtA)
  5098. _ = i
  5099. var l int
  5100. _ = l
  5101. if m.RetainHeight != 0 {
  5102. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5103. i--
  5104. dAtA[i] = 0x18
  5105. }
  5106. if len(m.Data) > 0 {
  5107. i -= len(m.Data)
  5108. copy(dAtA[i:], m.Data)
  5109. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5110. i--
  5111. dAtA[i] = 0x12
  5112. }
  5113. return len(dAtA) - i, nil
  5114. }
  5115. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5116. size := m.Size()
  5117. dAtA = make([]byte, size)
  5118. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5119. if err != nil {
  5120. return nil, err
  5121. }
  5122. return dAtA[:n], nil
  5123. }
  5124. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5125. size := m.Size()
  5126. return m.MarshalToSizedBuffer(dAtA[:size])
  5127. }
  5128. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5129. i := len(dAtA)
  5130. _ = i
  5131. var l int
  5132. _ = l
  5133. if len(m.Snapshots) > 0 {
  5134. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5135. {
  5136. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5137. if err != nil {
  5138. return 0, err
  5139. }
  5140. i -= size
  5141. i = encodeVarintTypes(dAtA, i, uint64(size))
  5142. }
  5143. i--
  5144. dAtA[i] = 0xa
  5145. }
  5146. }
  5147. return len(dAtA) - i, nil
  5148. }
  5149. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5150. size := m.Size()
  5151. dAtA = make([]byte, size)
  5152. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5153. if err != nil {
  5154. return nil, err
  5155. }
  5156. return dAtA[:n], nil
  5157. }
  5158. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5159. size := m.Size()
  5160. return m.MarshalToSizedBuffer(dAtA[:size])
  5161. }
  5162. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5163. i := len(dAtA)
  5164. _ = i
  5165. var l int
  5166. _ = l
  5167. if m.Result != 0 {
  5168. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5169. i--
  5170. dAtA[i] = 0x8
  5171. }
  5172. return len(dAtA) - i, nil
  5173. }
  5174. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5175. size := m.Size()
  5176. dAtA = make([]byte, size)
  5177. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5178. if err != nil {
  5179. return nil, err
  5180. }
  5181. return dAtA[:n], nil
  5182. }
  5183. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5184. size := m.Size()
  5185. return m.MarshalToSizedBuffer(dAtA[:size])
  5186. }
  5187. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5188. i := len(dAtA)
  5189. _ = i
  5190. var l int
  5191. _ = l
  5192. if len(m.Chunk) > 0 {
  5193. i -= len(m.Chunk)
  5194. copy(dAtA[i:], m.Chunk)
  5195. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5196. i--
  5197. dAtA[i] = 0xa
  5198. }
  5199. return len(dAtA) - i, nil
  5200. }
  5201. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5202. size := m.Size()
  5203. dAtA = make([]byte, size)
  5204. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5205. if err != nil {
  5206. return nil, err
  5207. }
  5208. return dAtA[:n], nil
  5209. }
  5210. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5211. size := m.Size()
  5212. return m.MarshalToSizedBuffer(dAtA[:size])
  5213. }
  5214. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5215. i := len(dAtA)
  5216. _ = i
  5217. var l int
  5218. _ = l
  5219. if len(m.RejectSenders) > 0 {
  5220. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5221. i -= len(m.RejectSenders[iNdEx])
  5222. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5223. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5224. i--
  5225. dAtA[i] = 0x1a
  5226. }
  5227. }
  5228. if len(m.RefetchChunks) > 0 {
  5229. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5230. var j38 int
  5231. for _, num := range m.RefetchChunks {
  5232. for num >= 1<<7 {
  5233. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5234. num >>= 7
  5235. j38++
  5236. }
  5237. dAtA39[j38] = uint8(num)
  5238. j38++
  5239. }
  5240. i -= j38
  5241. copy(dAtA[i:], dAtA39[:j38])
  5242. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5243. i--
  5244. dAtA[i] = 0x12
  5245. }
  5246. if m.Result != 0 {
  5247. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5248. i--
  5249. dAtA[i] = 0x8
  5250. }
  5251. return len(dAtA) - i, nil
  5252. }
  5253. func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
  5254. size := m.Size()
  5255. dAtA = make([]byte, size)
  5256. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5257. if err != nil {
  5258. return nil, err
  5259. }
  5260. return dAtA[:n], nil
  5261. }
  5262. func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
  5263. size := m.Size()
  5264. return m.MarshalToSizedBuffer(dAtA[:size])
  5265. }
  5266. func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5267. i := len(dAtA)
  5268. _ = i
  5269. var l int
  5270. _ = l
  5271. if m.Version != nil {
  5272. {
  5273. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  5274. if err != nil {
  5275. return 0, err
  5276. }
  5277. i -= size
  5278. i = encodeVarintTypes(dAtA, i, uint64(size))
  5279. }
  5280. i--
  5281. dAtA[i] = 0x22
  5282. }
  5283. if m.Validator != nil {
  5284. {
  5285. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5286. if err != nil {
  5287. return 0, err
  5288. }
  5289. i -= size
  5290. i = encodeVarintTypes(dAtA, i, uint64(size))
  5291. }
  5292. i--
  5293. dAtA[i] = 0x1a
  5294. }
  5295. if m.Evidence != nil {
  5296. {
  5297. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  5298. if err != nil {
  5299. return 0, err
  5300. }
  5301. i -= size
  5302. i = encodeVarintTypes(dAtA, i, uint64(size))
  5303. }
  5304. i--
  5305. dAtA[i] = 0x12
  5306. }
  5307. if m.Block != nil {
  5308. {
  5309. size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
  5310. if err != nil {
  5311. return 0, err
  5312. }
  5313. i -= size
  5314. i = encodeVarintTypes(dAtA, i, uint64(size))
  5315. }
  5316. i--
  5317. dAtA[i] = 0xa
  5318. }
  5319. return len(dAtA) - i, nil
  5320. }
  5321. func (m *BlockParams) Marshal() (dAtA []byte, err error) {
  5322. size := m.Size()
  5323. dAtA = make([]byte, size)
  5324. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5325. if err != nil {
  5326. return nil, err
  5327. }
  5328. return dAtA[:n], nil
  5329. }
  5330. func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) {
  5331. size := m.Size()
  5332. return m.MarshalToSizedBuffer(dAtA[:size])
  5333. }
  5334. func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5335. i := len(dAtA)
  5336. _ = i
  5337. var l int
  5338. _ = l
  5339. if m.MaxGas != 0 {
  5340. i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas))
  5341. i--
  5342. dAtA[i] = 0x10
  5343. }
  5344. if m.MaxBytes != 0 {
  5345. i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes))
  5346. i--
  5347. dAtA[i] = 0x8
  5348. }
  5349. return len(dAtA) - i, nil
  5350. }
  5351. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5352. size := m.Size()
  5353. dAtA = make([]byte, size)
  5354. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5355. if err != nil {
  5356. return nil, err
  5357. }
  5358. return dAtA[:n], nil
  5359. }
  5360. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5361. size := m.Size()
  5362. return m.MarshalToSizedBuffer(dAtA[:size])
  5363. }
  5364. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5365. i := len(dAtA)
  5366. _ = i
  5367. var l int
  5368. _ = l
  5369. if len(m.Votes) > 0 {
  5370. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5371. {
  5372. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5373. if err != nil {
  5374. return 0, err
  5375. }
  5376. i -= size
  5377. i = encodeVarintTypes(dAtA, i, uint64(size))
  5378. }
  5379. i--
  5380. dAtA[i] = 0x12
  5381. }
  5382. }
  5383. if m.Round != 0 {
  5384. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5385. i--
  5386. dAtA[i] = 0x8
  5387. }
  5388. return len(dAtA) - i, nil
  5389. }
  5390. func (m *Event) Marshal() (dAtA []byte, err error) {
  5391. size := m.Size()
  5392. dAtA = make([]byte, size)
  5393. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5394. if err != nil {
  5395. return nil, err
  5396. }
  5397. return dAtA[:n], nil
  5398. }
  5399. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5400. size := m.Size()
  5401. return m.MarshalToSizedBuffer(dAtA[:size])
  5402. }
  5403. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5404. i := len(dAtA)
  5405. _ = i
  5406. var l int
  5407. _ = l
  5408. if len(m.Attributes) > 0 {
  5409. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5410. {
  5411. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5412. if err != nil {
  5413. return 0, err
  5414. }
  5415. i -= size
  5416. i = encodeVarintTypes(dAtA, i, uint64(size))
  5417. }
  5418. i--
  5419. dAtA[i] = 0x12
  5420. }
  5421. }
  5422. if len(m.Type) > 0 {
  5423. i -= len(m.Type)
  5424. copy(dAtA[i:], m.Type)
  5425. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5426. i--
  5427. dAtA[i] = 0xa
  5428. }
  5429. return len(dAtA) - i, nil
  5430. }
  5431. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5432. size := m.Size()
  5433. dAtA = make([]byte, size)
  5434. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5435. if err != nil {
  5436. return nil, err
  5437. }
  5438. return dAtA[:n], nil
  5439. }
  5440. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5441. size := m.Size()
  5442. return m.MarshalToSizedBuffer(dAtA[:size])
  5443. }
  5444. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5445. i := len(dAtA)
  5446. _ = i
  5447. var l int
  5448. _ = l
  5449. if m.Index {
  5450. i--
  5451. if m.Index {
  5452. dAtA[i] = 1
  5453. } else {
  5454. dAtA[i] = 0
  5455. }
  5456. i--
  5457. dAtA[i] = 0x18
  5458. }
  5459. if len(m.Value) > 0 {
  5460. i -= len(m.Value)
  5461. copy(dAtA[i:], m.Value)
  5462. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5463. i--
  5464. dAtA[i] = 0x12
  5465. }
  5466. if len(m.Key) > 0 {
  5467. i -= len(m.Key)
  5468. copy(dAtA[i:], m.Key)
  5469. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5470. i--
  5471. dAtA[i] = 0xa
  5472. }
  5473. return len(dAtA) - i, nil
  5474. }
  5475. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5476. size := m.Size()
  5477. dAtA = make([]byte, size)
  5478. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5479. if err != nil {
  5480. return nil, err
  5481. }
  5482. return dAtA[:n], nil
  5483. }
  5484. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5485. size := m.Size()
  5486. return m.MarshalToSizedBuffer(dAtA[:size])
  5487. }
  5488. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5489. i := len(dAtA)
  5490. _ = i
  5491. var l int
  5492. _ = l
  5493. {
  5494. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5495. if err != nil {
  5496. return 0, err
  5497. }
  5498. i -= size
  5499. i = encodeVarintTypes(dAtA, i, uint64(size))
  5500. }
  5501. i--
  5502. dAtA[i] = 0x22
  5503. if len(m.Tx) > 0 {
  5504. i -= len(m.Tx)
  5505. copy(dAtA[i:], m.Tx)
  5506. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5507. i--
  5508. dAtA[i] = 0x1a
  5509. }
  5510. if m.Index != 0 {
  5511. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5512. i--
  5513. dAtA[i] = 0x10
  5514. }
  5515. if m.Height != 0 {
  5516. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5517. i--
  5518. dAtA[i] = 0x8
  5519. }
  5520. return len(dAtA) - i, nil
  5521. }
  5522. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5523. size := m.Size()
  5524. dAtA = make([]byte, size)
  5525. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5526. if err != nil {
  5527. return nil, err
  5528. }
  5529. return dAtA[:n], nil
  5530. }
  5531. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5532. size := m.Size()
  5533. return m.MarshalToSizedBuffer(dAtA[:size])
  5534. }
  5535. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5536. i := len(dAtA)
  5537. _ = i
  5538. var l int
  5539. _ = l
  5540. if m.Power != 0 {
  5541. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5542. i--
  5543. dAtA[i] = 0x18
  5544. }
  5545. if len(m.Address) > 0 {
  5546. i -= len(m.Address)
  5547. copy(dAtA[i:], m.Address)
  5548. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5549. i--
  5550. dAtA[i] = 0xa
  5551. }
  5552. return len(dAtA) - i, nil
  5553. }
  5554. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5555. size := m.Size()
  5556. dAtA = make([]byte, size)
  5557. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5558. if err != nil {
  5559. return nil, err
  5560. }
  5561. return dAtA[:n], nil
  5562. }
  5563. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5564. size := m.Size()
  5565. return m.MarshalToSizedBuffer(dAtA[:size])
  5566. }
  5567. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5568. i := len(dAtA)
  5569. _ = i
  5570. var l int
  5571. _ = l
  5572. if m.Power != 0 {
  5573. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5574. i--
  5575. dAtA[i] = 0x10
  5576. }
  5577. {
  5578. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5579. if err != nil {
  5580. return 0, err
  5581. }
  5582. i -= size
  5583. i = encodeVarintTypes(dAtA, i, uint64(size))
  5584. }
  5585. i--
  5586. dAtA[i] = 0xa
  5587. return len(dAtA) - i, nil
  5588. }
  5589. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5590. size := m.Size()
  5591. dAtA = make([]byte, size)
  5592. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5593. if err != nil {
  5594. return nil, err
  5595. }
  5596. return dAtA[:n], nil
  5597. }
  5598. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5599. size := m.Size()
  5600. return m.MarshalToSizedBuffer(dAtA[:size])
  5601. }
  5602. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5603. i := len(dAtA)
  5604. _ = i
  5605. var l int
  5606. _ = l
  5607. if m.SignedLastBlock {
  5608. i--
  5609. if m.SignedLastBlock {
  5610. dAtA[i] = 1
  5611. } else {
  5612. dAtA[i] = 0
  5613. }
  5614. i--
  5615. dAtA[i] = 0x10
  5616. }
  5617. {
  5618. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5619. if err != nil {
  5620. return 0, err
  5621. }
  5622. i -= size
  5623. i = encodeVarintTypes(dAtA, i, uint64(size))
  5624. }
  5625. i--
  5626. dAtA[i] = 0xa
  5627. return len(dAtA) - i, nil
  5628. }
  5629. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5630. size := m.Size()
  5631. dAtA = make([]byte, size)
  5632. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5633. if err != nil {
  5634. return nil, err
  5635. }
  5636. return dAtA[:n], nil
  5637. }
  5638. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5639. size := m.Size()
  5640. return m.MarshalToSizedBuffer(dAtA[:size])
  5641. }
  5642. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5643. i := len(dAtA)
  5644. _ = i
  5645. var l int
  5646. _ = l
  5647. if m.TotalVotingPower != 0 {
  5648. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5649. i--
  5650. dAtA[i] = 0x28
  5651. }
  5652. n47, err47 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5653. if err47 != nil {
  5654. return 0, err47
  5655. }
  5656. i -= n47
  5657. i = encodeVarintTypes(dAtA, i, uint64(n47))
  5658. i--
  5659. dAtA[i] = 0x22
  5660. if m.Height != 0 {
  5661. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5662. i--
  5663. dAtA[i] = 0x18
  5664. }
  5665. {
  5666. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5667. if err != nil {
  5668. return 0, err
  5669. }
  5670. i -= size
  5671. i = encodeVarintTypes(dAtA, i, uint64(size))
  5672. }
  5673. i--
  5674. dAtA[i] = 0x12
  5675. if m.Type != 0 {
  5676. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5677. i--
  5678. dAtA[i] = 0x8
  5679. }
  5680. return len(dAtA) - i, nil
  5681. }
  5682. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5683. size := m.Size()
  5684. dAtA = make([]byte, size)
  5685. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5686. if err != nil {
  5687. return nil, err
  5688. }
  5689. return dAtA[:n], nil
  5690. }
  5691. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5692. size := m.Size()
  5693. return m.MarshalToSizedBuffer(dAtA[:size])
  5694. }
  5695. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5696. i := len(dAtA)
  5697. _ = i
  5698. var l int
  5699. _ = l
  5700. if len(m.Metadata) > 0 {
  5701. i -= len(m.Metadata)
  5702. copy(dAtA[i:], m.Metadata)
  5703. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5704. i--
  5705. dAtA[i] = 0x2a
  5706. }
  5707. if len(m.Hash) > 0 {
  5708. i -= len(m.Hash)
  5709. copy(dAtA[i:], m.Hash)
  5710. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5711. i--
  5712. dAtA[i] = 0x22
  5713. }
  5714. if m.Chunks != 0 {
  5715. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5716. i--
  5717. dAtA[i] = 0x18
  5718. }
  5719. if m.Format != 0 {
  5720. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5721. i--
  5722. dAtA[i] = 0x10
  5723. }
  5724. if m.Height != 0 {
  5725. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5726. i--
  5727. dAtA[i] = 0x8
  5728. }
  5729. return len(dAtA) - i, nil
  5730. }
  5731. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5732. offset -= sovTypes(v)
  5733. base := offset
  5734. for v >= 1<<7 {
  5735. dAtA[offset] = uint8(v&0x7f | 0x80)
  5736. v >>= 7
  5737. offset++
  5738. }
  5739. dAtA[offset] = uint8(v)
  5740. return base
  5741. }
  5742. func (m *Request) Size() (n int) {
  5743. if m == nil {
  5744. return 0
  5745. }
  5746. var l int
  5747. _ = l
  5748. if m.Value != nil {
  5749. n += m.Value.Size()
  5750. }
  5751. return n
  5752. }
  5753. func (m *Request_Echo) Size() (n int) {
  5754. if m == nil {
  5755. return 0
  5756. }
  5757. var l int
  5758. _ = l
  5759. if m.Echo != nil {
  5760. l = m.Echo.Size()
  5761. n += 1 + l + sovTypes(uint64(l))
  5762. }
  5763. return n
  5764. }
  5765. func (m *Request_Flush) Size() (n int) {
  5766. if m == nil {
  5767. return 0
  5768. }
  5769. var l int
  5770. _ = l
  5771. if m.Flush != nil {
  5772. l = m.Flush.Size()
  5773. n += 1 + l + sovTypes(uint64(l))
  5774. }
  5775. return n
  5776. }
  5777. func (m *Request_Info) Size() (n int) {
  5778. if m == nil {
  5779. return 0
  5780. }
  5781. var l int
  5782. _ = l
  5783. if m.Info != nil {
  5784. l = m.Info.Size()
  5785. n += 1 + l + sovTypes(uint64(l))
  5786. }
  5787. return n
  5788. }
  5789. func (m *Request_InitChain) Size() (n int) {
  5790. if m == nil {
  5791. return 0
  5792. }
  5793. var l int
  5794. _ = l
  5795. if m.InitChain != nil {
  5796. l = m.InitChain.Size()
  5797. n += 1 + l + sovTypes(uint64(l))
  5798. }
  5799. return n
  5800. }
  5801. func (m *Request_Query) Size() (n int) {
  5802. if m == nil {
  5803. return 0
  5804. }
  5805. var l int
  5806. _ = l
  5807. if m.Query != nil {
  5808. l = m.Query.Size()
  5809. n += 1 + l + sovTypes(uint64(l))
  5810. }
  5811. return n
  5812. }
  5813. func (m *Request_BeginBlock) Size() (n int) {
  5814. if m == nil {
  5815. return 0
  5816. }
  5817. var l int
  5818. _ = l
  5819. if m.BeginBlock != nil {
  5820. l = m.BeginBlock.Size()
  5821. n += 1 + l + sovTypes(uint64(l))
  5822. }
  5823. return n
  5824. }
  5825. func (m *Request_CheckTx) Size() (n int) {
  5826. if m == nil {
  5827. return 0
  5828. }
  5829. var l int
  5830. _ = l
  5831. if m.CheckTx != nil {
  5832. l = m.CheckTx.Size()
  5833. n += 1 + l + sovTypes(uint64(l))
  5834. }
  5835. return n
  5836. }
  5837. func (m *Request_DeliverTx) Size() (n int) {
  5838. if m == nil {
  5839. return 0
  5840. }
  5841. var l int
  5842. _ = l
  5843. if m.DeliverTx != nil {
  5844. l = m.DeliverTx.Size()
  5845. n += 1 + l + sovTypes(uint64(l))
  5846. }
  5847. return n
  5848. }
  5849. func (m *Request_EndBlock) Size() (n int) {
  5850. if m == nil {
  5851. return 0
  5852. }
  5853. var l int
  5854. _ = l
  5855. if m.EndBlock != nil {
  5856. l = m.EndBlock.Size()
  5857. n += 1 + l + sovTypes(uint64(l))
  5858. }
  5859. return n
  5860. }
  5861. func (m *Request_Commit) Size() (n int) {
  5862. if m == nil {
  5863. return 0
  5864. }
  5865. var l int
  5866. _ = l
  5867. if m.Commit != nil {
  5868. l = m.Commit.Size()
  5869. n += 1 + l + sovTypes(uint64(l))
  5870. }
  5871. return n
  5872. }
  5873. func (m *Request_ListSnapshots) Size() (n int) {
  5874. if m == nil {
  5875. return 0
  5876. }
  5877. var l int
  5878. _ = l
  5879. if m.ListSnapshots != nil {
  5880. l = m.ListSnapshots.Size()
  5881. n += 1 + l + sovTypes(uint64(l))
  5882. }
  5883. return n
  5884. }
  5885. func (m *Request_OfferSnapshot) Size() (n int) {
  5886. if m == nil {
  5887. return 0
  5888. }
  5889. var l int
  5890. _ = l
  5891. if m.OfferSnapshot != nil {
  5892. l = m.OfferSnapshot.Size()
  5893. n += 1 + l + sovTypes(uint64(l))
  5894. }
  5895. return n
  5896. }
  5897. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5898. if m == nil {
  5899. return 0
  5900. }
  5901. var l int
  5902. _ = l
  5903. if m.LoadSnapshotChunk != nil {
  5904. l = m.LoadSnapshotChunk.Size()
  5905. n += 1 + l + sovTypes(uint64(l))
  5906. }
  5907. return n
  5908. }
  5909. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5910. if m == nil {
  5911. return 0
  5912. }
  5913. var l int
  5914. _ = l
  5915. if m.ApplySnapshotChunk != nil {
  5916. l = m.ApplySnapshotChunk.Size()
  5917. n += 1 + l + sovTypes(uint64(l))
  5918. }
  5919. return n
  5920. }
  5921. func (m *RequestEcho) Size() (n int) {
  5922. if m == nil {
  5923. return 0
  5924. }
  5925. var l int
  5926. _ = l
  5927. l = len(m.Message)
  5928. if l > 0 {
  5929. n += 1 + l + sovTypes(uint64(l))
  5930. }
  5931. return n
  5932. }
  5933. func (m *RequestFlush) Size() (n int) {
  5934. if m == nil {
  5935. return 0
  5936. }
  5937. var l int
  5938. _ = l
  5939. return n
  5940. }
  5941. func (m *RequestInfo) Size() (n int) {
  5942. if m == nil {
  5943. return 0
  5944. }
  5945. var l int
  5946. _ = l
  5947. l = len(m.Version)
  5948. if l > 0 {
  5949. n += 1 + l + sovTypes(uint64(l))
  5950. }
  5951. if m.BlockVersion != 0 {
  5952. n += 1 + sovTypes(uint64(m.BlockVersion))
  5953. }
  5954. if m.P2PVersion != 0 {
  5955. n += 1 + sovTypes(uint64(m.P2PVersion))
  5956. }
  5957. return n
  5958. }
  5959. func (m *RequestInitChain) Size() (n int) {
  5960. if m == nil {
  5961. return 0
  5962. }
  5963. var l int
  5964. _ = l
  5965. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5966. n += 1 + l + sovTypes(uint64(l))
  5967. l = len(m.ChainId)
  5968. if l > 0 {
  5969. n += 1 + l + sovTypes(uint64(l))
  5970. }
  5971. if m.ConsensusParams != nil {
  5972. l = m.ConsensusParams.Size()
  5973. n += 1 + l + sovTypes(uint64(l))
  5974. }
  5975. if len(m.Validators) > 0 {
  5976. for _, e := range m.Validators {
  5977. l = e.Size()
  5978. n += 1 + l + sovTypes(uint64(l))
  5979. }
  5980. }
  5981. l = len(m.AppStateBytes)
  5982. if l > 0 {
  5983. n += 1 + l + sovTypes(uint64(l))
  5984. }
  5985. if m.InitialHeight != 0 {
  5986. n += 1 + sovTypes(uint64(m.InitialHeight))
  5987. }
  5988. return n
  5989. }
  5990. func (m *RequestQuery) Size() (n int) {
  5991. if m == nil {
  5992. return 0
  5993. }
  5994. var l int
  5995. _ = l
  5996. l = len(m.Data)
  5997. if l > 0 {
  5998. n += 1 + l + sovTypes(uint64(l))
  5999. }
  6000. l = len(m.Path)
  6001. if l > 0 {
  6002. n += 1 + l + sovTypes(uint64(l))
  6003. }
  6004. if m.Height != 0 {
  6005. n += 1 + sovTypes(uint64(m.Height))
  6006. }
  6007. if m.Prove {
  6008. n += 2
  6009. }
  6010. return n
  6011. }
  6012. func (m *RequestBeginBlock) Size() (n int) {
  6013. if m == nil {
  6014. return 0
  6015. }
  6016. var l int
  6017. _ = l
  6018. l = len(m.Hash)
  6019. if l > 0 {
  6020. n += 1 + l + sovTypes(uint64(l))
  6021. }
  6022. l = m.Header.Size()
  6023. n += 1 + l + sovTypes(uint64(l))
  6024. l = m.LastCommitInfo.Size()
  6025. n += 1 + l + sovTypes(uint64(l))
  6026. if len(m.ByzantineValidators) > 0 {
  6027. for _, e := range m.ByzantineValidators {
  6028. l = e.Size()
  6029. n += 1 + l + sovTypes(uint64(l))
  6030. }
  6031. }
  6032. return n
  6033. }
  6034. func (m *RequestCheckTx) Size() (n int) {
  6035. if m == nil {
  6036. return 0
  6037. }
  6038. var l int
  6039. _ = l
  6040. l = len(m.Tx)
  6041. if l > 0 {
  6042. n += 1 + l + sovTypes(uint64(l))
  6043. }
  6044. if m.Type != 0 {
  6045. n += 1 + sovTypes(uint64(m.Type))
  6046. }
  6047. return n
  6048. }
  6049. func (m *RequestDeliverTx) Size() (n int) {
  6050. if m == nil {
  6051. return 0
  6052. }
  6053. var l int
  6054. _ = l
  6055. l = len(m.Tx)
  6056. if l > 0 {
  6057. n += 1 + l + sovTypes(uint64(l))
  6058. }
  6059. return n
  6060. }
  6061. func (m *RequestEndBlock) Size() (n int) {
  6062. if m == nil {
  6063. return 0
  6064. }
  6065. var l int
  6066. _ = l
  6067. if m.Height != 0 {
  6068. n += 1 + sovTypes(uint64(m.Height))
  6069. }
  6070. return n
  6071. }
  6072. func (m *RequestCommit) Size() (n int) {
  6073. if m == nil {
  6074. return 0
  6075. }
  6076. var l int
  6077. _ = l
  6078. return n
  6079. }
  6080. func (m *RequestListSnapshots) Size() (n int) {
  6081. if m == nil {
  6082. return 0
  6083. }
  6084. var l int
  6085. _ = l
  6086. return n
  6087. }
  6088. func (m *RequestOfferSnapshot) Size() (n int) {
  6089. if m == nil {
  6090. return 0
  6091. }
  6092. var l int
  6093. _ = l
  6094. if m.Snapshot != nil {
  6095. l = m.Snapshot.Size()
  6096. n += 1 + l + sovTypes(uint64(l))
  6097. }
  6098. l = len(m.AppHash)
  6099. if l > 0 {
  6100. n += 1 + l + sovTypes(uint64(l))
  6101. }
  6102. return n
  6103. }
  6104. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  6105. if m == nil {
  6106. return 0
  6107. }
  6108. var l int
  6109. _ = l
  6110. if m.Height != 0 {
  6111. n += 1 + sovTypes(uint64(m.Height))
  6112. }
  6113. if m.Format != 0 {
  6114. n += 1 + sovTypes(uint64(m.Format))
  6115. }
  6116. if m.Chunk != 0 {
  6117. n += 1 + sovTypes(uint64(m.Chunk))
  6118. }
  6119. return n
  6120. }
  6121. func (m *RequestApplySnapshotChunk) Size() (n int) {
  6122. if m == nil {
  6123. return 0
  6124. }
  6125. var l int
  6126. _ = l
  6127. if m.Index != 0 {
  6128. n += 1 + sovTypes(uint64(m.Index))
  6129. }
  6130. l = len(m.Chunk)
  6131. if l > 0 {
  6132. n += 1 + l + sovTypes(uint64(l))
  6133. }
  6134. l = len(m.Sender)
  6135. if l > 0 {
  6136. n += 1 + l + sovTypes(uint64(l))
  6137. }
  6138. return n
  6139. }
  6140. func (m *Response) Size() (n int) {
  6141. if m == nil {
  6142. return 0
  6143. }
  6144. var l int
  6145. _ = l
  6146. if m.Value != nil {
  6147. n += m.Value.Size()
  6148. }
  6149. return n
  6150. }
  6151. func (m *Response_Exception) Size() (n int) {
  6152. if m == nil {
  6153. return 0
  6154. }
  6155. var l int
  6156. _ = l
  6157. if m.Exception != nil {
  6158. l = m.Exception.Size()
  6159. n += 1 + l + sovTypes(uint64(l))
  6160. }
  6161. return n
  6162. }
  6163. func (m *Response_Echo) Size() (n int) {
  6164. if m == nil {
  6165. return 0
  6166. }
  6167. var l int
  6168. _ = l
  6169. if m.Echo != nil {
  6170. l = m.Echo.Size()
  6171. n += 1 + l + sovTypes(uint64(l))
  6172. }
  6173. return n
  6174. }
  6175. func (m *Response_Flush) Size() (n int) {
  6176. if m == nil {
  6177. return 0
  6178. }
  6179. var l int
  6180. _ = l
  6181. if m.Flush != nil {
  6182. l = m.Flush.Size()
  6183. n += 1 + l + sovTypes(uint64(l))
  6184. }
  6185. return n
  6186. }
  6187. func (m *Response_Info) Size() (n int) {
  6188. if m == nil {
  6189. return 0
  6190. }
  6191. var l int
  6192. _ = l
  6193. if m.Info != nil {
  6194. l = m.Info.Size()
  6195. n += 1 + l + sovTypes(uint64(l))
  6196. }
  6197. return n
  6198. }
  6199. func (m *Response_InitChain) Size() (n int) {
  6200. if m == nil {
  6201. return 0
  6202. }
  6203. var l int
  6204. _ = l
  6205. if m.InitChain != nil {
  6206. l = m.InitChain.Size()
  6207. n += 1 + l + sovTypes(uint64(l))
  6208. }
  6209. return n
  6210. }
  6211. func (m *Response_Query) Size() (n int) {
  6212. if m == nil {
  6213. return 0
  6214. }
  6215. var l int
  6216. _ = l
  6217. if m.Query != nil {
  6218. l = m.Query.Size()
  6219. n += 1 + l + sovTypes(uint64(l))
  6220. }
  6221. return n
  6222. }
  6223. func (m *Response_BeginBlock) Size() (n int) {
  6224. if m == nil {
  6225. return 0
  6226. }
  6227. var l int
  6228. _ = l
  6229. if m.BeginBlock != nil {
  6230. l = m.BeginBlock.Size()
  6231. n += 1 + l + sovTypes(uint64(l))
  6232. }
  6233. return n
  6234. }
  6235. func (m *Response_CheckTx) Size() (n int) {
  6236. if m == nil {
  6237. return 0
  6238. }
  6239. var l int
  6240. _ = l
  6241. if m.CheckTx != nil {
  6242. l = m.CheckTx.Size()
  6243. n += 1 + l + sovTypes(uint64(l))
  6244. }
  6245. return n
  6246. }
  6247. func (m *Response_DeliverTx) Size() (n int) {
  6248. if m == nil {
  6249. return 0
  6250. }
  6251. var l int
  6252. _ = l
  6253. if m.DeliverTx != nil {
  6254. l = m.DeliverTx.Size()
  6255. n += 1 + l + sovTypes(uint64(l))
  6256. }
  6257. return n
  6258. }
  6259. func (m *Response_EndBlock) Size() (n int) {
  6260. if m == nil {
  6261. return 0
  6262. }
  6263. var l int
  6264. _ = l
  6265. if m.EndBlock != nil {
  6266. l = m.EndBlock.Size()
  6267. n += 1 + l + sovTypes(uint64(l))
  6268. }
  6269. return n
  6270. }
  6271. func (m *Response_Commit) Size() (n int) {
  6272. if m == nil {
  6273. return 0
  6274. }
  6275. var l int
  6276. _ = l
  6277. if m.Commit != nil {
  6278. l = m.Commit.Size()
  6279. n += 1 + l + sovTypes(uint64(l))
  6280. }
  6281. return n
  6282. }
  6283. func (m *Response_ListSnapshots) Size() (n int) {
  6284. if m == nil {
  6285. return 0
  6286. }
  6287. var l int
  6288. _ = l
  6289. if m.ListSnapshots != nil {
  6290. l = m.ListSnapshots.Size()
  6291. n += 1 + l + sovTypes(uint64(l))
  6292. }
  6293. return n
  6294. }
  6295. func (m *Response_OfferSnapshot) Size() (n int) {
  6296. if m == nil {
  6297. return 0
  6298. }
  6299. var l int
  6300. _ = l
  6301. if m.OfferSnapshot != nil {
  6302. l = m.OfferSnapshot.Size()
  6303. n += 1 + l + sovTypes(uint64(l))
  6304. }
  6305. return n
  6306. }
  6307. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6308. if m == nil {
  6309. return 0
  6310. }
  6311. var l int
  6312. _ = l
  6313. if m.LoadSnapshotChunk != nil {
  6314. l = m.LoadSnapshotChunk.Size()
  6315. n += 1 + l + sovTypes(uint64(l))
  6316. }
  6317. return n
  6318. }
  6319. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6320. if m == nil {
  6321. return 0
  6322. }
  6323. var l int
  6324. _ = l
  6325. if m.ApplySnapshotChunk != nil {
  6326. l = m.ApplySnapshotChunk.Size()
  6327. n += 1 + l + sovTypes(uint64(l))
  6328. }
  6329. return n
  6330. }
  6331. func (m *ResponseException) Size() (n int) {
  6332. if m == nil {
  6333. return 0
  6334. }
  6335. var l int
  6336. _ = l
  6337. l = len(m.Error)
  6338. if l > 0 {
  6339. n += 1 + l + sovTypes(uint64(l))
  6340. }
  6341. return n
  6342. }
  6343. func (m *ResponseEcho) Size() (n int) {
  6344. if m == nil {
  6345. return 0
  6346. }
  6347. var l int
  6348. _ = l
  6349. l = len(m.Message)
  6350. if l > 0 {
  6351. n += 1 + l + sovTypes(uint64(l))
  6352. }
  6353. return n
  6354. }
  6355. func (m *ResponseFlush) Size() (n int) {
  6356. if m == nil {
  6357. return 0
  6358. }
  6359. var l int
  6360. _ = l
  6361. return n
  6362. }
  6363. func (m *ResponseInfo) Size() (n int) {
  6364. if m == nil {
  6365. return 0
  6366. }
  6367. var l int
  6368. _ = l
  6369. l = len(m.Data)
  6370. if l > 0 {
  6371. n += 1 + l + sovTypes(uint64(l))
  6372. }
  6373. l = len(m.Version)
  6374. if l > 0 {
  6375. n += 1 + l + sovTypes(uint64(l))
  6376. }
  6377. if m.AppVersion != 0 {
  6378. n += 1 + sovTypes(uint64(m.AppVersion))
  6379. }
  6380. if m.LastBlockHeight != 0 {
  6381. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6382. }
  6383. l = len(m.LastBlockAppHash)
  6384. if l > 0 {
  6385. n += 1 + l + sovTypes(uint64(l))
  6386. }
  6387. return n
  6388. }
  6389. func (m *ResponseInitChain) Size() (n int) {
  6390. if m == nil {
  6391. return 0
  6392. }
  6393. var l int
  6394. _ = l
  6395. if m.ConsensusParams != nil {
  6396. l = m.ConsensusParams.Size()
  6397. n += 1 + l + sovTypes(uint64(l))
  6398. }
  6399. if len(m.Validators) > 0 {
  6400. for _, e := range m.Validators {
  6401. l = e.Size()
  6402. n += 1 + l + sovTypes(uint64(l))
  6403. }
  6404. }
  6405. l = len(m.AppHash)
  6406. if l > 0 {
  6407. n += 1 + l + sovTypes(uint64(l))
  6408. }
  6409. return n
  6410. }
  6411. func (m *ResponseQuery) Size() (n int) {
  6412. if m == nil {
  6413. return 0
  6414. }
  6415. var l int
  6416. _ = l
  6417. if m.Code != 0 {
  6418. n += 1 + sovTypes(uint64(m.Code))
  6419. }
  6420. l = len(m.Log)
  6421. if l > 0 {
  6422. n += 1 + l + sovTypes(uint64(l))
  6423. }
  6424. l = len(m.Info)
  6425. if l > 0 {
  6426. n += 1 + l + sovTypes(uint64(l))
  6427. }
  6428. if m.Index != 0 {
  6429. n += 1 + sovTypes(uint64(m.Index))
  6430. }
  6431. l = len(m.Key)
  6432. if l > 0 {
  6433. n += 1 + l + sovTypes(uint64(l))
  6434. }
  6435. l = len(m.Value)
  6436. if l > 0 {
  6437. n += 1 + l + sovTypes(uint64(l))
  6438. }
  6439. if m.ProofOps != nil {
  6440. l = m.ProofOps.Size()
  6441. n += 1 + l + sovTypes(uint64(l))
  6442. }
  6443. if m.Height != 0 {
  6444. n += 1 + sovTypes(uint64(m.Height))
  6445. }
  6446. l = len(m.Codespace)
  6447. if l > 0 {
  6448. n += 1 + l + sovTypes(uint64(l))
  6449. }
  6450. return n
  6451. }
  6452. func (m *ResponseBeginBlock) Size() (n int) {
  6453. if m == nil {
  6454. return 0
  6455. }
  6456. var l int
  6457. _ = l
  6458. if len(m.Events) > 0 {
  6459. for _, e := range m.Events {
  6460. l = e.Size()
  6461. n += 1 + l + sovTypes(uint64(l))
  6462. }
  6463. }
  6464. return n
  6465. }
  6466. func (m *ResponseCheckTx) Size() (n int) {
  6467. if m == nil {
  6468. return 0
  6469. }
  6470. var l int
  6471. _ = l
  6472. if m.Code != 0 {
  6473. n += 1 + sovTypes(uint64(m.Code))
  6474. }
  6475. l = len(m.Data)
  6476. if l > 0 {
  6477. n += 1 + l + sovTypes(uint64(l))
  6478. }
  6479. l = len(m.Log)
  6480. if l > 0 {
  6481. n += 1 + l + sovTypes(uint64(l))
  6482. }
  6483. l = len(m.Info)
  6484. if l > 0 {
  6485. n += 1 + l + sovTypes(uint64(l))
  6486. }
  6487. if m.GasWanted != 0 {
  6488. n += 1 + sovTypes(uint64(m.GasWanted))
  6489. }
  6490. if m.GasUsed != 0 {
  6491. n += 1 + sovTypes(uint64(m.GasUsed))
  6492. }
  6493. if len(m.Events) > 0 {
  6494. for _, e := range m.Events {
  6495. l = e.Size()
  6496. n += 1 + l + sovTypes(uint64(l))
  6497. }
  6498. }
  6499. l = len(m.Codespace)
  6500. if l > 0 {
  6501. n += 1 + l + sovTypes(uint64(l))
  6502. }
  6503. return n
  6504. }
  6505. func (m *ResponseDeliverTx) Size() (n int) {
  6506. if m == nil {
  6507. return 0
  6508. }
  6509. var l int
  6510. _ = l
  6511. if m.Code != 0 {
  6512. n += 1 + sovTypes(uint64(m.Code))
  6513. }
  6514. l = len(m.Data)
  6515. if l > 0 {
  6516. n += 1 + l + sovTypes(uint64(l))
  6517. }
  6518. l = len(m.Log)
  6519. if l > 0 {
  6520. n += 1 + l + sovTypes(uint64(l))
  6521. }
  6522. l = len(m.Info)
  6523. if l > 0 {
  6524. n += 1 + l + sovTypes(uint64(l))
  6525. }
  6526. if m.GasWanted != 0 {
  6527. n += 1 + sovTypes(uint64(m.GasWanted))
  6528. }
  6529. if m.GasUsed != 0 {
  6530. n += 1 + sovTypes(uint64(m.GasUsed))
  6531. }
  6532. if len(m.Events) > 0 {
  6533. for _, e := range m.Events {
  6534. l = e.Size()
  6535. n += 1 + l + sovTypes(uint64(l))
  6536. }
  6537. }
  6538. l = len(m.Codespace)
  6539. if l > 0 {
  6540. n += 1 + l + sovTypes(uint64(l))
  6541. }
  6542. return n
  6543. }
  6544. func (m *ResponseEndBlock) Size() (n int) {
  6545. if m == nil {
  6546. return 0
  6547. }
  6548. var l int
  6549. _ = l
  6550. if len(m.ValidatorUpdates) > 0 {
  6551. for _, e := range m.ValidatorUpdates {
  6552. l = e.Size()
  6553. n += 1 + l + sovTypes(uint64(l))
  6554. }
  6555. }
  6556. if m.ConsensusParamUpdates != nil {
  6557. l = m.ConsensusParamUpdates.Size()
  6558. n += 1 + l + sovTypes(uint64(l))
  6559. }
  6560. if len(m.Events) > 0 {
  6561. for _, e := range m.Events {
  6562. l = e.Size()
  6563. n += 1 + l + sovTypes(uint64(l))
  6564. }
  6565. }
  6566. return n
  6567. }
  6568. func (m *ResponseCommit) Size() (n int) {
  6569. if m == nil {
  6570. return 0
  6571. }
  6572. var l int
  6573. _ = l
  6574. l = len(m.Data)
  6575. if l > 0 {
  6576. n += 1 + l + sovTypes(uint64(l))
  6577. }
  6578. if m.RetainHeight != 0 {
  6579. n += 1 + sovTypes(uint64(m.RetainHeight))
  6580. }
  6581. return n
  6582. }
  6583. func (m *ResponseListSnapshots) Size() (n int) {
  6584. if m == nil {
  6585. return 0
  6586. }
  6587. var l int
  6588. _ = l
  6589. if len(m.Snapshots) > 0 {
  6590. for _, e := range m.Snapshots {
  6591. l = e.Size()
  6592. n += 1 + l + sovTypes(uint64(l))
  6593. }
  6594. }
  6595. return n
  6596. }
  6597. func (m *ResponseOfferSnapshot) Size() (n int) {
  6598. if m == nil {
  6599. return 0
  6600. }
  6601. var l int
  6602. _ = l
  6603. if m.Result != 0 {
  6604. n += 1 + sovTypes(uint64(m.Result))
  6605. }
  6606. return n
  6607. }
  6608. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6609. if m == nil {
  6610. return 0
  6611. }
  6612. var l int
  6613. _ = l
  6614. l = len(m.Chunk)
  6615. if l > 0 {
  6616. n += 1 + l + sovTypes(uint64(l))
  6617. }
  6618. return n
  6619. }
  6620. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6621. if m == nil {
  6622. return 0
  6623. }
  6624. var l int
  6625. _ = l
  6626. if m.Result != 0 {
  6627. n += 1 + sovTypes(uint64(m.Result))
  6628. }
  6629. if len(m.RefetchChunks) > 0 {
  6630. l = 0
  6631. for _, e := range m.RefetchChunks {
  6632. l += sovTypes(uint64(e))
  6633. }
  6634. n += 1 + sovTypes(uint64(l)) + l
  6635. }
  6636. if len(m.RejectSenders) > 0 {
  6637. for _, s := range m.RejectSenders {
  6638. l = len(s)
  6639. n += 1 + l + sovTypes(uint64(l))
  6640. }
  6641. }
  6642. return n
  6643. }
  6644. func (m *ConsensusParams) Size() (n int) {
  6645. if m == nil {
  6646. return 0
  6647. }
  6648. var l int
  6649. _ = l
  6650. if m.Block != nil {
  6651. l = m.Block.Size()
  6652. n += 1 + l + sovTypes(uint64(l))
  6653. }
  6654. if m.Evidence != nil {
  6655. l = m.Evidence.Size()
  6656. n += 1 + l + sovTypes(uint64(l))
  6657. }
  6658. if m.Validator != nil {
  6659. l = m.Validator.Size()
  6660. n += 1 + l + sovTypes(uint64(l))
  6661. }
  6662. if m.Version != nil {
  6663. l = m.Version.Size()
  6664. n += 1 + l + sovTypes(uint64(l))
  6665. }
  6666. return n
  6667. }
  6668. func (m *BlockParams) Size() (n int) {
  6669. if m == nil {
  6670. return 0
  6671. }
  6672. var l int
  6673. _ = l
  6674. if m.MaxBytes != 0 {
  6675. n += 1 + sovTypes(uint64(m.MaxBytes))
  6676. }
  6677. if m.MaxGas != 0 {
  6678. n += 1 + sovTypes(uint64(m.MaxGas))
  6679. }
  6680. return n
  6681. }
  6682. func (m *LastCommitInfo) Size() (n int) {
  6683. if m == nil {
  6684. return 0
  6685. }
  6686. var l int
  6687. _ = l
  6688. if m.Round != 0 {
  6689. n += 1 + sovTypes(uint64(m.Round))
  6690. }
  6691. if len(m.Votes) > 0 {
  6692. for _, e := range m.Votes {
  6693. l = e.Size()
  6694. n += 1 + l + sovTypes(uint64(l))
  6695. }
  6696. }
  6697. return n
  6698. }
  6699. func (m *Event) Size() (n int) {
  6700. if m == nil {
  6701. return 0
  6702. }
  6703. var l int
  6704. _ = l
  6705. l = len(m.Type)
  6706. if l > 0 {
  6707. n += 1 + l + sovTypes(uint64(l))
  6708. }
  6709. if len(m.Attributes) > 0 {
  6710. for _, e := range m.Attributes {
  6711. l = e.Size()
  6712. n += 1 + l + sovTypes(uint64(l))
  6713. }
  6714. }
  6715. return n
  6716. }
  6717. func (m *EventAttribute) Size() (n int) {
  6718. if m == nil {
  6719. return 0
  6720. }
  6721. var l int
  6722. _ = l
  6723. l = len(m.Key)
  6724. if l > 0 {
  6725. n += 1 + l + sovTypes(uint64(l))
  6726. }
  6727. l = len(m.Value)
  6728. if l > 0 {
  6729. n += 1 + l + sovTypes(uint64(l))
  6730. }
  6731. if m.Index {
  6732. n += 2
  6733. }
  6734. return n
  6735. }
  6736. func (m *TxResult) Size() (n int) {
  6737. if m == nil {
  6738. return 0
  6739. }
  6740. var l int
  6741. _ = l
  6742. if m.Height != 0 {
  6743. n += 1 + sovTypes(uint64(m.Height))
  6744. }
  6745. if m.Index != 0 {
  6746. n += 1 + sovTypes(uint64(m.Index))
  6747. }
  6748. l = len(m.Tx)
  6749. if l > 0 {
  6750. n += 1 + l + sovTypes(uint64(l))
  6751. }
  6752. l = m.Result.Size()
  6753. n += 1 + l + sovTypes(uint64(l))
  6754. return n
  6755. }
  6756. func (m *Validator) Size() (n int) {
  6757. if m == nil {
  6758. return 0
  6759. }
  6760. var l int
  6761. _ = l
  6762. l = len(m.Address)
  6763. if l > 0 {
  6764. n += 1 + l + sovTypes(uint64(l))
  6765. }
  6766. if m.Power != 0 {
  6767. n += 1 + sovTypes(uint64(m.Power))
  6768. }
  6769. return n
  6770. }
  6771. func (m *ValidatorUpdate) Size() (n int) {
  6772. if m == nil {
  6773. return 0
  6774. }
  6775. var l int
  6776. _ = l
  6777. l = m.PubKey.Size()
  6778. n += 1 + l + sovTypes(uint64(l))
  6779. if m.Power != 0 {
  6780. n += 1 + sovTypes(uint64(m.Power))
  6781. }
  6782. return n
  6783. }
  6784. func (m *VoteInfo) Size() (n int) {
  6785. if m == nil {
  6786. return 0
  6787. }
  6788. var l int
  6789. _ = l
  6790. l = m.Validator.Size()
  6791. n += 1 + l + sovTypes(uint64(l))
  6792. if m.SignedLastBlock {
  6793. n += 2
  6794. }
  6795. return n
  6796. }
  6797. func (m *Evidence) Size() (n int) {
  6798. if m == nil {
  6799. return 0
  6800. }
  6801. var l int
  6802. _ = l
  6803. if m.Type != 0 {
  6804. n += 1 + sovTypes(uint64(m.Type))
  6805. }
  6806. l = m.Validator.Size()
  6807. n += 1 + l + sovTypes(uint64(l))
  6808. if m.Height != 0 {
  6809. n += 1 + sovTypes(uint64(m.Height))
  6810. }
  6811. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6812. n += 1 + l + sovTypes(uint64(l))
  6813. if m.TotalVotingPower != 0 {
  6814. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6815. }
  6816. return n
  6817. }
  6818. func (m *Snapshot) Size() (n int) {
  6819. if m == nil {
  6820. return 0
  6821. }
  6822. var l int
  6823. _ = l
  6824. if m.Height != 0 {
  6825. n += 1 + sovTypes(uint64(m.Height))
  6826. }
  6827. if m.Format != 0 {
  6828. n += 1 + sovTypes(uint64(m.Format))
  6829. }
  6830. if m.Chunks != 0 {
  6831. n += 1 + sovTypes(uint64(m.Chunks))
  6832. }
  6833. l = len(m.Hash)
  6834. if l > 0 {
  6835. n += 1 + l + sovTypes(uint64(l))
  6836. }
  6837. l = len(m.Metadata)
  6838. if l > 0 {
  6839. n += 1 + l + sovTypes(uint64(l))
  6840. }
  6841. return n
  6842. }
  6843. func sovTypes(x uint64) (n int) {
  6844. return (math_bits.Len64(x|1) + 6) / 7
  6845. }
  6846. func sozTypes(x uint64) (n int) {
  6847. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6848. }
  6849. func (m *Request) Unmarshal(dAtA []byte) error {
  6850. l := len(dAtA)
  6851. iNdEx := 0
  6852. for iNdEx < l {
  6853. preIndex := iNdEx
  6854. var wire uint64
  6855. for shift := uint(0); ; shift += 7 {
  6856. if shift >= 64 {
  6857. return ErrIntOverflowTypes
  6858. }
  6859. if iNdEx >= l {
  6860. return io.ErrUnexpectedEOF
  6861. }
  6862. b := dAtA[iNdEx]
  6863. iNdEx++
  6864. wire |= uint64(b&0x7F) << shift
  6865. if b < 0x80 {
  6866. break
  6867. }
  6868. }
  6869. fieldNum := int32(wire >> 3)
  6870. wireType := int(wire & 0x7)
  6871. if wireType == 4 {
  6872. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6873. }
  6874. if fieldNum <= 0 {
  6875. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6876. }
  6877. switch fieldNum {
  6878. case 1:
  6879. if wireType != 2 {
  6880. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6881. }
  6882. var msglen int
  6883. for shift := uint(0); ; shift += 7 {
  6884. if shift >= 64 {
  6885. return ErrIntOverflowTypes
  6886. }
  6887. if iNdEx >= l {
  6888. return io.ErrUnexpectedEOF
  6889. }
  6890. b := dAtA[iNdEx]
  6891. iNdEx++
  6892. msglen |= int(b&0x7F) << shift
  6893. if b < 0x80 {
  6894. break
  6895. }
  6896. }
  6897. if msglen < 0 {
  6898. return ErrInvalidLengthTypes
  6899. }
  6900. postIndex := iNdEx + msglen
  6901. if postIndex < 0 {
  6902. return ErrInvalidLengthTypes
  6903. }
  6904. if postIndex > l {
  6905. return io.ErrUnexpectedEOF
  6906. }
  6907. v := &RequestEcho{}
  6908. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6909. return err
  6910. }
  6911. m.Value = &Request_Echo{v}
  6912. iNdEx = postIndex
  6913. case 2:
  6914. if wireType != 2 {
  6915. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6916. }
  6917. var msglen int
  6918. for shift := uint(0); ; shift += 7 {
  6919. if shift >= 64 {
  6920. return ErrIntOverflowTypes
  6921. }
  6922. if iNdEx >= l {
  6923. return io.ErrUnexpectedEOF
  6924. }
  6925. b := dAtA[iNdEx]
  6926. iNdEx++
  6927. msglen |= int(b&0x7F) << shift
  6928. if b < 0x80 {
  6929. break
  6930. }
  6931. }
  6932. if msglen < 0 {
  6933. return ErrInvalidLengthTypes
  6934. }
  6935. postIndex := iNdEx + msglen
  6936. if postIndex < 0 {
  6937. return ErrInvalidLengthTypes
  6938. }
  6939. if postIndex > l {
  6940. return io.ErrUnexpectedEOF
  6941. }
  6942. v := &RequestFlush{}
  6943. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6944. return err
  6945. }
  6946. m.Value = &Request_Flush{v}
  6947. iNdEx = postIndex
  6948. case 3:
  6949. if wireType != 2 {
  6950. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6951. }
  6952. var msglen int
  6953. for shift := uint(0); ; shift += 7 {
  6954. if shift >= 64 {
  6955. return ErrIntOverflowTypes
  6956. }
  6957. if iNdEx >= l {
  6958. return io.ErrUnexpectedEOF
  6959. }
  6960. b := dAtA[iNdEx]
  6961. iNdEx++
  6962. msglen |= int(b&0x7F) << shift
  6963. if b < 0x80 {
  6964. break
  6965. }
  6966. }
  6967. if msglen < 0 {
  6968. return ErrInvalidLengthTypes
  6969. }
  6970. postIndex := iNdEx + msglen
  6971. if postIndex < 0 {
  6972. return ErrInvalidLengthTypes
  6973. }
  6974. if postIndex > l {
  6975. return io.ErrUnexpectedEOF
  6976. }
  6977. v := &RequestInfo{}
  6978. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6979. return err
  6980. }
  6981. m.Value = &Request_Info{v}
  6982. iNdEx = postIndex
  6983. case 4:
  6984. if wireType != 2 {
  6985. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  6986. }
  6987. var msglen int
  6988. for shift := uint(0); ; shift += 7 {
  6989. if shift >= 64 {
  6990. return ErrIntOverflowTypes
  6991. }
  6992. if iNdEx >= l {
  6993. return io.ErrUnexpectedEOF
  6994. }
  6995. b := dAtA[iNdEx]
  6996. iNdEx++
  6997. msglen |= int(b&0x7F) << shift
  6998. if b < 0x80 {
  6999. break
  7000. }
  7001. }
  7002. if msglen < 0 {
  7003. return ErrInvalidLengthTypes
  7004. }
  7005. postIndex := iNdEx + msglen
  7006. if postIndex < 0 {
  7007. return ErrInvalidLengthTypes
  7008. }
  7009. if postIndex > l {
  7010. return io.ErrUnexpectedEOF
  7011. }
  7012. v := &RequestInitChain{}
  7013. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7014. return err
  7015. }
  7016. m.Value = &Request_InitChain{v}
  7017. iNdEx = postIndex
  7018. case 5:
  7019. if wireType != 2 {
  7020. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  7021. }
  7022. var msglen int
  7023. for shift := uint(0); ; shift += 7 {
  7024. if shift >= 64 {
  7025. return ErrIntOverflowTypes
  7026. }
  7027. if iNdEx >= l {
  7028. return io.ErrUnexpectedEOF
  7029. }
  7030. b := dAtA[iNdEx]
  7031. iNdEx++
  7032. msglen |= int(b&0x7F) << shift
  7033. if b < 0x80 {
  7034. break
  7035. }
  7036. }
  7037. if msglen < 0 {
  7038. return ErrInvalidLengthTypes
  7039. }
  7040. postIndex := iNdEx + msglen
  7041. if postIndex < 0 {
  7042. return ErrInvalidLengthTypes
  7043. }
  7044. if postIndex > l {
  7045. return io.ErrUnexpectedEOF
  7046. }
  7047. v := &RequestQuery{}
  7048. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7049. return err
  7050. }
  7051. m.Value = &Request_Query{v}
  7052. iNdEx = postIndex
  7053. case 6:
  7054. if wireType != 2 {
  7055. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  7056. }
  7057. var msglen int
  7058. for shift := uint(0); ; shift += 7 {
  7059. if shift >= 64 {
  7060. return ErrIntOverflowTypes
  7061. }
  7062. if iNdEx >= l {
  7063. return io.ErrUnexpectedEOF
  7064. }
  7065. b := dAtA[iNdEx]
  7066. iNdEx++
  7067. msglen |= int(b&0x7F) << shift
  7068. if b < 0x80 {
  7069. break
  7070. }
  7071. }
  7072. if msglen < 0 {
  7073. return ErrInvalidLengthTypes
  7074. }
  7075. postIndex := iNdEx + msglen
  7076. if postIndex < 0 {
  7077. return ErrInvalidLengthTypes
  7078. }
  7079. if postIndex > l {
  7080. return io.ErrUnexpectedEOF
  7081. }
  7082. v := &RequestBeginBlock{}
  7083. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7084. return err
  7085. }
  7086. m.Value = &Request_BeginBlock{v}
  7087. iNdEx = postIndex
  7088. case 7:
  7089. if wireType != 2 {
  7090. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  7091. }
  7092. var msglen int
  7093. for shift := uint(0); ; shift += 7 {
  7094. if shift >= 64 {
  7095. return ErrIntOverflowTypes
  7096. }
  7097. if iNdEx >= l {
  7098. return io.ErrUnexpectedEOF
  7099. }
  7100. b := dAtA[iNdEx]
  7101. iNdEx++
  7102. msglen |= int(b&0x7F) << shift
  7103. if b < 0x80 {
  7104. break
  7105. }
  7106. }
  7107. if msglen < 0 {
  7108. return ErrInvalidLengthTypes
  7109. }
  7110. postIndex := iNdEx + msglen
  7111. if postIndex < 0 {
  7112. return ErrInvalidLengthTypes
  7113. }
  7114. if postIndex > l {
  7115. return io.ErrUnexpectedEOF
  7116. }
  7117. v := &RequestCheckTx{}
  7118. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7119. return err
  7120. }
  7121. m.Value = &Request_CheckTx{v}
  7122. iNdEx = postIndex
  7123. case 8:
  7124. if wireType != 2 {
  7125. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  7126. }
  7127. var msglen int
  7128. for shift := uint(0); ; shift += 7 {
  7129. if shift >= 64 {
  7130. return ErrIntOverflowTypes
  7131. }
  7132. if iNdEx >= l {
  7133. return io.ErrUnexpectedEOF
  7134. }
  7135. b := dAtA[iNdEx]
  7136. iNdEx++
  7137. msglen |= int(b&0x7F) << shift
  7138. if b < 0x80 {
  7139. break
  7140. }
  7141. }
  7142. if msglen < 0 {
  7143. return ErrInvalidLengthTypes
  7144. }
  7145. postIndex := iNdEx + msglen
  7146. if postIndex < 0 {
  7147. return ErrInvalidLengthTypes
  7148. }
  7149. if postIndex > l {
  7150. return io.ErrUnexpectedEOF
  7151. }
  7152. v := &RequestDeliverTx{}
  7153. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7154. return err
  7155. }
  7156. m.Value = &Request_DeliverTx{v}
  7157. iNdEx = postIndex
  7158. case 9:
  7159. if wireType != 2 {
  7160. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  7161. }
  7162. var msglen int
  7163. for shift := uint(0); ; shift += 7 {
  7164. if shift >= 64 {
  7165. return ErrIntOverflowTypes
  7166. }
  7167. if iNdEx >= l {
  7168. return io.ErrUnexpectedEOF
  7169. }
  7170. b := dAtA[iNdEx]
  7171. iNdEx++
  7172. msglen |= int(b&0x7F) << shift
  7173. if b < 0x80 {
  7174. break
  7175. }
  7176. }
  7177. if msglen < 0 {
  7178. return ErrInvalidLengthTypes
  7179. }
  7180. postIndex := iNdEx + msglen
  7181. if postIndex < 0 {
  7182. return ErrInvalidLengthTypes
  7183. }
  7184. if postIndex > l {
  7185. return io.ErrUnexpectedEOF
  7186. }
  7187. v := &RequestEndBlock{}
  7188. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7189. return err
  7190. }
  7191. m.Value = &Request_EndBlock{v}
  7192. iNdEx = postIndex
  7193. case 10:
  7194. if wireType != 2 {
  7195. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7196. }
  7197. var msglen int
  7198. for shift := uint(0); ; shift += 7 {
  7199. if shift >= 64 {
  7200. return ErrIntOverflowTypes
  7201. }
  7202. if iNdEx >= l {
  7203. return io.ErrUnexpectedEOF
  7204. }
  7205. b := dAtA[iNdEx]
  7206. iNdEx++
  7207. msglen |= int(b&0x7F) << shift
  7208. if b < 0x80 {
  7209. break
  7210. }
  7211. }
  7212. if msglen < 0 {
  7213. return ErrInvalidLengthTypes
  7214. }
  7215. postIndex := iNdEx + msglen
  7216. if postIndex < 0 {
  7217. return ErrInvalidLengthTypes
  7218. }
  7219. if postIndex > l {
  7220. return io.ErrUnexpectedEOF
  7221. }
  7222. v := &RequestCommit{}
  7223. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7224. return err
  7225. }
  7226. m.Value = &Request_Commit{v}
  7227. iNdEx = postIndex
  7228. case 11:
  7229. if wireType != 2 {
  7230. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7231. }
  7232. var msglen int
  7233. for shift := uint(0); ; shift += 7 {
  7234. if shift >= 64 {
  7235. return ErrIntOverflowTypes
  7236. }
  7237. if iNdEx >= l {
  7238. return io.ErrUnexpectedEOF
  7239. }
  7240. b := dAtA[iNdEx]
  7241. iNdEx++
  7242. msglen |= int(b&0x7F) << shift
  7243. if b < 0x80 {
  7244. break
  7245. }
  7246. }
  7247. if msglen < 0 {
  7248. return ErrInvalidLengthTypes
  7249. }
  7250. postIndex := iNdEx + msglen
  7251. if postIndex < 0 {
  7252. return ErrInvalidLengthTypes
  7253. }
  7254. if postIndex > l {
  7255. return io.ErrUnexpectedEOF
  7256. }
  7257. v := &RequestListSnapshots{}
  7258. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7259. return err
  7260. }
  7261. m.Value = &Request_ListSnapshots{v}
  7262. iNdEx = postIndex
  7263. case 12:
  7264. if wireType != 2 {
  7265. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7266. }
  7267. var msglen int
  7268. for shift := uint(0); ; shift += 7 {
  7269. if shift >= 64 {
  7270. return ErrIntOverflowTypes
  7271. }
  7272. if iNdEx >= l {
  7273. return io.ErrUnexpectedEOF
  7274. }
  7275. b := dAtA[iNdEx]
  7276. iNdEx++
  7277. msglen |= int(b&0x7F) << shift
  7278. if b < 0x80 {
  7279. break
  7280. }
  7281. }
  7282. if msglen < 0 {
  7283. return ErrInvalidLengthTypes
  7284. }
  7285. postIndex := iNdEx + msglen
  7286. if postIndex < 0 {
  7287. return ErrInvalidLengthTypes
  7288. }
  7289. if postIndex > l {
  7290. return io.ErrUnexpectedEOF
  7291. }
  7292. v := &RequestOfferSnapshot{}
  7293. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7294. return err
  7295. }
  7296. m.Value = &Request_OfferSnapshot{v}
  7297. iNdEx = postIndex
  7298. case 13:
  7299. if wireType != 2 {
  7300. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7301. }
  7302. var msglen int
  7303. for shift := uint(0); ; shift += 7 {
  7304. if shift >= 64 {
  7305. return ErrIntOverflowTypes
  7306. }
  7307. if iNdEx >= l {
  7308. return io.ErrUnexpectedEOF
  7309. }
  7310. b := dAtA[iNdEx]
  7311. iNdEx++
  7312. msglen |= int(b&0x7F) << shift
  7313. if b < 0x80 {
  7314. break
  7315. }
  7316. }
  7317. if msglen < 0 {
  7318. return ErrInvalidLengthTypes
  7319. }
  7320. postIndex := iNdEx + msglen
  7321. if postIndex < 0 {
  7322. return ErrInvalidLengthTypes
  7323. }
  7324. if postIndex > l {
  7325. return io.ErrUnexpectedEOF
  7326. }
  7327. v := &RequestLoadSnapshotChunk{}
  7328. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7329. return err
  7330. }
  7331. m.Value = &Request_LoadSnapshotChunk{v}
  7332. iNdEx = postIndex
  7333. case 14:
  7334. if wireType != 2 {
  7335. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7336. }
  7337. var msglen int
  7338. for shift := uint(0); ; shift += 7 {
  7339. if shift >= 64 {
  7340. return ErrIntOverflowTypes
  7341. }
  7342. if iNdEx >= l {
  7343. return io.ErrUnexpectedEOF
  7344. }
  7345. b := dAtA[iNdEx]
  7346. iNdEx++
  7347. msglen |= int(b&0x7F) << shift
  7348. if b < 0x80 {
  7349. break
  7350. }
  7351. }
  7352. if msglen < 0 {
  7353. return ErrInvalidLengthTypes
  7354. }
  7355. postIndex := iNdEx + msglen
  7356. if postIndex < 0 {
  7357. return ErrInvalidLengthTypes
  7358. }
  7359. if postIndex > l {
  7360. return io.ErrUnexpectedEOF
  7361. }
  7362. v := &RequestApplySnapshotChunk{}
  7363. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7364. return err
  7365. }
  7366. m.Value = &Request_ApplySnapshotChunk{v}
  7367. iNdEx = postIndex
  7368. default:
  7369. iNdEx = preIndex
  7370. skippy, err := skipTypes(dAtA[iNdEx:])
  7371. if err != nil {
  7372. return err
  7373. }
  7374. if skippy < 0 {
  7375. return ErrInvalidLengthTypes
  7376. }
  7377. if (iNdEx + skippy) < 0 {
  7378. return ErrInvalidLengthTypes
  7379. }
  7380. if (iNdEx + skippy) > l {
  7381. return io.ErrUnexpectedEOF
  7382. }
  7383. iNdEx += skippy
  7384. }
  7385. }
  7386. if iNdEx > l {
  7387. return io.ErrUnexpectedEOF
  7388. }
  7389. return nil
  7390. }
  7391. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7392. l := len(dAtA)
  7393. iNdEx := 0
  7394. for iNdEx < l {
  7395. preIndex := iNdEx
  7396. var wire uint64
  7397. for shift := uint(0); ; shift += 7 {
  7398. if shift >= 64 {
  7399. return ErrIntOverflowTypes
  7400. }
  7401. if iNdEx >= l {
  7402. return io.ErrUnexpectedEOF
  7403. }
  7404. b := dAtA[iNdEx]
  7405. iNdEx++
  7406. wire |= uint64(b&0x7F) << shift
  7407. if b < 0x80 {
  7408. break
  7409. }
  7410. }
  7411. fieldNum := int32(wire >> 3)
  7412. wireType := int(wire & 0x7)
  7413. if wireType == 4 {
  7414. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7415. }
  7416. if fieldNum <= 0 {
  7417. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7418. }
  7419. switch fieldNum {
  7420. case 1:
  7421. if wireType != 2 {
  7422. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7423. }
  7424. var stringLen uint64
  7425. for shift := uint(0); ; shift += 7 {
  7426. if shift >= 64 {
  7427. return ErrIntOverflowTypes
  7428. }
  7429. if iNdEx >= l {
  7430. return io.ErrUnexpectedEOF
  7431. }
  7432. b := dAtA[iNdEx]
  7433. iNdEx++
  7434. stringLen |= uint64(b&0x7F) << shift
  7435. if b < 0x80 {
  7436. break
  7437. }
  7438. }
  7439. intStringLen := int(stringLen)
  7440. if intStringLen < 0 {
  7441. return ErrInvalidLengthTypes
  7442. }
  7443. postIndex := iNdEx + intStringLen
  7444. if postIndex < 0 {
  7445. return ErrInvalidLengthTypes
  7446. }
  7447. if postIndex > l {
  7448. return io.ErrUnexpectedEOF
  7449. }
  7450. m.Message = string(dAtA[iNdEx:postIndex])
  7451. iNdEx = postIndex
  7452. default:
  7453. iNdEx = preIndex
  7454. skippy, err := skipTypes(dAtA[iNdEx:])
  7455. if err != nil {
  7456. return err
  7457. }
  7458. if skippy < 0 {
  7459. return ErrInvalidLengthTypes
  7460. }
  7461. if (iNdEx + skippy) < 0 {
  7462. return ErrInvalidLengthTypes
  7463. }
  7464. if (iNdEx + skippy) > l {
  7465. return io.ErrUnexpectedEOF
  7466. }
  7467. iNdEx += skippy
  7468. }
  7469. }
  7470. if iNdEx > l {
  7471. return io.ErrUnexpectedEOF
  7472. }
  7473. return nil
  7474. }
  7475. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7476. l := len(dAtA)
  7477. iNdEx := 0
  7478. for iNdEx < l {
  7479. preIndex := iNdEx
  7480. var wire uint64
  7481. for shift := uint(0); ; shift += 7 {
  7482. if shift >= 64 {
  7483. return ErrIntOverflowTypes
  7484. }
  7485. if iNdEx >= l {
  7486. return io.ErrUnexpectedEOF
  7487. }
  7488. b := dAtA[iNdEx]
  7489. iNdEx++
  7490. wire |= uint64(b&0x7F) << shift
  7491. if b < 0x80 {
  7492. break
  7493. }
  7494. }
  7495. fieldNum := int32(wire >> 3)
  7496. wireType := int(wire & 0x7)
  7497. if wireType == 4 {
  7498. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7499. }
  7500. if fieldNum <= 0 {
  7501. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7502. }
  7503. switch fieldNum {
  7504. default:
  7505. iNdEx = preIndex
  7506. skippy, err := skipTypes(dAtA[iNdEx:])
  7507. if err != nil {
  7508. return err
  7509. }
  7510. if skippy < 0 {
  7511. return ErrInvalidLengthTypes
  7512. }
  7513. if (iNdEx + skippy) < 0 {
  7514. return ErrInvalidLengthTypes
  7515. }
  7516. if (iNdEx + skippy) > l {
  7517. return io.ErrUnexpectedEOF
  7518. }
  7519. iNdEx += skippy
  7520. }
  7521. }
  7522. if iNdEx > l {
  7523. return io.ErrUnexpectedEOF
  7524. }
  7525. return nil
  7526. }
  7527. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7528. l := len(dAtA)
  7529. iNdEx := 0
  7530. for iNdEx < l {
  7531. preIndex := iNdEx
  7532. var wire uint64
  7533. for shift := uint(0); ; shift += 7 {
  7534. if shift >= 64 {
  7535. return ErrIntOverflowTypes
  7536. }
  7537. if iNdEx >= l {
  7538. return io.ErrUnexpectedEOF
  7539. }
  7540. b := dAtA[iNdEx]
  7541. iNdEx++
  7542. wire |= uint64(b&0x7F) << shift
  7543. if b < 0x80 {
  7544. break
  7545. }
  7546. }
  7547. fieldNum := int32(wire >> 3)
  7548. wireType := int(wire & 0x7)
  7549. if wireType == 4 {
  7550. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7551. }
  7552. if fieldNum <= 0 {
  7553. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7554. }
  7555. switch fieldNum {
  7556. case 1:
  7557. if wireType != 2 {
  7558. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7559. }
  7560. var stringLen uint64
  7561. for shift := uint(0); ; shift += 7 {
  7562. if shift >= 64 {
  7563. return ErrIntOverflowTypes
  7564. }
  7565. if iNdEx >= l {
  7566. return io.ErrUnexpectedEOF
  7567. }
  7568. b := dAtA[iNdEx]
  7569. iNdEx++
  7570. stringLen |= uint64(b&0x7F) << shift
  7571. if b < 0x80 {
  7572. break
  7573. }
  7574. }
  7575. intStringLen := int(stringLen)
  7576. if intStringLen < 0 {
  7577. return ErrInvalidLengthTypes
  7578. }
  7579. postIndex := iNdEx + intStringLen
  7580. if postIndex < 0 {
  7581. return ErrInvalidLengthTypes
  7582. }
  7583. if postIndex > l {
  7584. return io.ErrUnexpectedEOF
  7585. }
  7586. m.Version = string(dAtA[iNdEx:postIndex])
  7587. iNdEx = postIndex
  7588. case 2:
  7589. if wireType != 0 {
  7590. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7591. }
  7592. m.BlockVersion = 0
  7593. for shift := uint(0); ; shift += 7 {
  7594. if shift >= 64 {
  7595. return ErrIntOverflowTypes
  7596. }
  7597. if iNdEx >= l {
  7598. return io.ErrUnexpectedEOF
  7599. }
  7600. b := dAtA[iNdEx]
  7601. iNdEx++
  7602. m.BlockVersion |= uint64(b&0x7F) << shift
  7603. if b < 0x80 {
  7604. break
  7605. }
  7606. }
  7607. case 3:
  7608. if wireType != 0 {
  7609. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7610. }
  7611. m.P2PVersion = 0
  7612. for shift := uint(0); ; shift += 7 {
  7613. if shift >= 64 {
  7614. return ErrIntOverflowTypes
  7615. }
  7616. if iNdEx >= l {
  7617. return io.ErrUnexpectedEOF
  7618. }
  7619. b := dAtA[iNdEx]
  7620. iNdEx++
  7621. m.P2PVersion |= uint64(b&0x7F) << shift
  7622. if b < 0x80 {
  7623. break
  7624. }
  7625. }
  7626. default:
  7627. iNdEx = preIndex
  7628. skippy, err := skipTypes(dAtA[iNdEx:])
  7629. if err != nil {
  7630. return err
  7631. }
  7632. if skippy < 0 {
  7633. return ErrInvalidLengthTypes
  7634. }
  7635. if (iNdEx + skippy) < 0 {
  7636. return ErrInvalidLengthTypes
  7637. }
  7638. if (iNdEx + skippy) > l {
  7639. return io.ErrUnexpectedEOF
  7640. }
  7641. iNdEx += skippy
  7642. }
  7643. }
  7644. if iNdEx > l {
  7645. return io.ErrUnexpectedEOF
  7646. }
  7647. return nil
  7648. }
  7649. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7650. l := len(dAtA)
  7651. iNdEx := 0
  7652. for iNdEx < l {
  7653. preIndex := iNdEx
  7654. var wire uint64
  7655. for shift := uint(0); ; shift += 7 {
  7656. if shift >= 64 {
  7657. return ErrIntOverflowTypes
  7658. }
  7659. if iNdEx >= l {
  7660. return io.ErrUnexpectedEOF
  7661. }
  7662. b := dAtA[iNdEx]
  7663. iNdEx++
  7664. wire |= uint64(b&0x7F) << shift
  7665. if b < 0x80 {
  7666. break
  7667. }
  7668. }
  7669. fieldNum := int32(wire >> 3)
  7670. wireType := int(wire & 0x7)
  7671. if wireType == 4 {
  7672. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7673. }
  7674. if fieldNum <= 0 {
  7675. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7676. }
  7677. switch fieldNum {
  7678. case 1:
  7679. if wireType != 2 {
  7680. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7681. }
  7682. var msglen int
  7683. for shift := uint(0); ; shift += 7 {
  7684. if shift >= 64 {
  7685. return ErrIntOverflowTypes
  7686. }
  7687. if iNdEx >= l {
  7688. return io.ErrUnexpectedEOF
  7689. }
  7690. b := dAtA[iNdEx]
  7691. iNdEx++
  7692. msglen |= int(b&0x7F) << shift
  7693. if b < 0x80 {
  7694. break
  7695. }
  7696. }
  7697. if msglen < 0 {
  7698. return ErrInvalidLengthTypes
  7699. }
  7700. postIndex := iNdEx + msglen
  7701. if postIndex < 0 {
  7702. return ErrInvalidLengthTypes
  7703. }
  7704. if postIndex > l {
  7705. return io.ErrUnexpectedEOF
  7706. }
  7707. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7708. return err
  7709. }
  7710. iNdEx = postIndex
  7711. case 2:
  7712. if wireType != 2 {
  7713. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7714. }
  7715. var stringLen uint64
  7716. for shift := uint(0); ; shift += 7 {
  7717. if shift >= 64 {
  7718. return ErrIntOverflowTypes
  7719. }
  7720. if iNdEx >= l {
  7721. return io.ErrUnexpectedEOF
  7722. }
  7723. b := dAtA[iNdEx]
  7724. iNdEx++
  7725. stringLen |= uint64(b&0x7F) << shift
  7726. if b < 0x80 {
  7727. break
  7728. }
  7729. }
  7730. intStringLen := int(stringLen)
  7731. if intStringLen < 0 {
  7732. return ErrInvalidLengthTypes
  7733. }
  7734. postIndex := iNdEx + intStringLen
  7735. if postIndex < 0 {
  7736. return ErrInvalidLengthTypes
  7737. }
  7738. if postIndex > l {
  7739. return io.ErrUnexpectedEOF
  7740. }
  7741. m.ChainId = string(dAtA[iNdEx:postIndex])
  7742. iNdEx = postIndex
  7743. case 3:
  7744. if wireType != 2 {
  7745. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7746. }
  7747. var msglen int
  7748. for shift := uint(0); ; shift += 7 {
  7749. if shift >= 64 {
  7750. return ErrIntOverflowTypes
  7751. }
  7752. if iNdEx >= l {
  7753. return io.ErrUnexpectedEOF
  7754. }
  7755. b := dAtA[iNdEx]
  7756. iNdEx++
  7757. msglen |= int(b&0x7F) << shift
  7758. if b < 0x80 {
  7759. break
  7760. }
  7761. }
  7762. if msglen < 0 {
  7763. return ErrInvalidLengthTypes
  7764. }
  7765. postIndex := iNdEx + msglen
  7766. if postIndex < 0 {
  7767. return ErrInvalidLengthTypes
  7768. }
  7769. if postIndex > l {
  7770. return io.ErrUnexpectedEOF
  7771. }
  7772. if m.ConsensusParams == nil {
  7773. m.ConsensusParams = &ConsensusParams{}
  7774. }
  7775. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7776. return err
  7777. }
  7778. iNdEx = postIndex
  7779. case 4:
  7780. if wireType != 2 {
  7781. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7782. }
  7783. var msglen int
  7784. for shift := uint(0); ; shift += 7 {
  7785. if shift >= 64 {
  7786. return ErrIntOverflowTypes
  7787. }
  7788. if iNdEx >= l {
  7789. return io.ErrUnexpectedEOF
  7790. }
  7791. b := dAtA[iNdEx]
  7792. iNdEx++
  7793. msglen |= int(b&0x7F) << shift
  7794. if b < 0x80 {
  7795. break
  7796. }
  7797. }
  7798. if msglen < 0 {
  7799. return ErrInvalidLengthTypes
  7800. }
  7801. postIndex := iNdEx + msglen
  7802. if postIndex < 0 {
  7803. return ErrInvalidLengthTypes
  7804. }
  7805. if postIndex > l {
  7806. return io.ErrUnexpectedEOF
  7807. }
  7808. m.Validators = append(m.Validators, ValidatorUpdate{})
  7809. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7810. return err
  7811. }
  7812. iNdEx = postIndex
  7813. case 5:
  7814. if wireType != 2 {
  7815. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7816. }
  7817. var byteLen int
  7818. for shift := uint(0); ; shift += 7 {
  7819. if shift >= 64 {
  7820. return ErrIntOverflowTypes
  7821. }
  7822. if iNdEx >= l {
  7823. return io.ErrUnexpectedEOF
  7824. }
  7825. b := dAtA[iNdEx]
  7826. iNdEx++
  7827. byteLen |= int(b&0x7F) << shift
  7828. if b < 0x80 {
  7829. break
  7830. }
  7831. }
  7832. if byteLen < 0 {
  7833. return ErrInvalidLengthTypes
  7834. }
  7835. postIndex := iNdEx + byteLen
  7836. if postIndex < 0 {
  7837. return ErrInvalidLengthTypes
  7838. }
  7839. if postIndex > l {
  7840. return io.ErrUnexpectedEOF
  7841. }
  7842. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7843. if m.AppStateBytes == nil {
  7844. m.AppStateBytes = []byte{}
  7845. }
  7846. iNdEx = postIndex
  7847. case 6:
  7848. if wireType != 0 {
  7849. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7850. }
  7851. m.InitialHeight = 0
  7852. for shift := uint(0); ; shift += 7 {
  7853. if shift >= 64 {
  7854. return ErrIntOverflowTypes
  7855. }
  7856. if iNdEx >= l {
  7857. return io.ErrUnexpectedEOF
  7858. }
  7859. b := dAtA[iNdEx]
  7860. iNdEx++
  7861. m.InitialHeight |= int64(b&0x7F) << shift
  7862. if b < 0x80 {
  7863. break
  7864. }
  7865. }
  7866. default:
  7867. iNdEx = preIndex
  7868. skippy, err := skipTypes(dAtA[iNdEx:])
  7869. if err != nil {
  7870. return err
  7871. }
  7872. if skippy < 0 {
  7873. return ErrInvalidLengthTypes
  7874. }
  7875. if (iNdEx + skippy) < 0 {
  7876. return ErrInvalidLengthTypes
  7877. }
  7878. if (iNdEx + skippy) > l {
  7879. return io.ErrUnexpectedEOF
  7880. }
  7881. iNdEx += skippy
  7882. }
  7883. }
  7884. if iNdEx > l {
  7885. return io.ErrUnexpectedEOF
  7886. }
  7887. return nil
  7888. }
  7889. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7890. l := len(dAtA)
  7891. iNdEx := 0
  7892. for iNdEx < l {
  7893. preIndex := iNdEx
  7894. var wire uint64
  7895. for shift := uint(0); ; shift += 7 {
  7896. if shift >= 64 {
  7897. return ErrIntOverflowTypes
  7898. }
  7899. if iNdEx >= l {
  7900. return io.ErrUnexpectedEOF
  7901. }
  7902. b := dAtA[iNdEx]
  7903. iNdEx++
  7904. wire |= uint64(b&0x7F) << shift
  7905. if b < 0x80 {
  7906. break
  7907. }
  7908. }
  7909. fieldNum := int32(wire >> 3)
  7910. wireType := int(wire & 0x7)
  7911. if wireType == 4 {
  7912. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7913. }
  7914. if fieldNum <= 0 {
  7915. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7916. }
  7917. switch fieldNum {
  7918. case 1:
  7919. if wireType != 2 {
  7920. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7921. }
  7922. var byteLen int
  7923. for shift := uint(0); ; shift += 7 {
  7924. if shift >= 64 {
  7925. return ErrIntOverflowTypes
  7926. }
  7927. if iNdEx >= l {
  7928. return io.ErrUnexpectedEOF
  7929. }
  7930. b := dAtA[iNdEx]
  7931. iNdEx++
  7932. byteLen |= int(b&0x7F) << shift
  7933. if b < 0x80 {
  7934. break
  7935. }
  7936. }
  7937. if byteLen < 0 {
  7938. return ErrInvalidLengthTypes
  7939. }
  7940. postIndex := iNdEx + byteLen
  7941. if postIndex < 0 {
  7942. return ErrInvalidLengthTypes
  7943. }
  7944. if postIndex > l {
  7945. return io.ErrUnexpectedEOF
  7946. }
  7947. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  7948. if m.Data == nil {
  7949. m.Data = []byte{}
  7950. }
  7951. iNdEx = postIndex
  7952. case 2:
  7953. if wireType != 2 {
  7954. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  7955. }
  7956. var stringLen uint64
  7957. for shift := uint(0); ; shift += 7 {
  7958. if shift >= 64 {
  7959. return ErrIntOverflowTypes
  7960. }
  7961. if iNdEx >= l {
  7962. return io.ErrUnexpectedEOF
  7963. }
  7964. b := dAtA[iNdEx]
  7965. iNdEx++
  7966. stringLen |= uint64(b&0x7F) << shift
  7967. if b < 0x80 {
  7968. break
  7969. }
  7970. }
  7971. intStringLen := int(stringLen)
  7972. if intStringLen < 0 {
  7973. return ErrInvalidLengthTypes
  7974. }
  7975. postIndex := iNdEx + intStringLen
  7976. if postIndex < 0 {
  7977. return ErrInvalidLengthTypes
  7978. }
  7979. if postIndex > l {
  7980. return io.ErrUnexpectedEOF
  7981. }
  7982. m.Path = string(dAtA[iNdEx:postIndex])
  7983. iNdEx = postIndex
  7984. case 3:
  7985. if wireType != 0 {
  7986. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  7987. }
  7988. m.Height = 0
  7989. for shift := uint(0); ; shift += 7 {
  7990. if shift >= 64 {
  7991. return ErrIntOverflowTypes
  7992. }
  7993. if iNdEx >= l {
  7994. return io.ErrUnexpectedEOF
  7995. }
  7996. b := dAtA[iNdEx]
  7997. iNdEx++
  7998. m.Height |= int64(b&0x7F) << shift
  7999. if b < 0x80 {
  8000. break
  8001. }
  8002. }
  8003. case 4:
  8004. if wireType != 0 {
  8005. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  8006. }
  8007. var v int
  8008. for shift := uint(0); ; shift += 7 {
  8009. if shift >= 64 {
  8010. return ErrIntOverflowTypes
  8011. }
  8012. if iNdEx >= l {
  8013. return io.ErrUnexpectedEOF
  8014. }
  8015. b := dAtA[iNdEx]
  8016. iNdEx++
  8017. v |= int(b&0x7F) << shift
  8018. if b < 0x80 {
  8019. break
  8020. }
  8021. }
  8022. m.Prove = bool(v != 0)
  8023. default:
  8024. iNdEx = preIndex
  8025. skippy, err := skipTypes(dAtA[iNdEx:])
  8026. if err != nil {
  8027. return err
  8028. }
  8029. if skippy < 0 {
  8030. return ErrInvalidLengthTypes
  8031. }
  8032. if (iNdEx + skippy) < 0 {
  8033. return ErrInvalidLengthTypes
  8034. }
  8035. if (iNdEx + skippy) > l {
  8036. return io.ErrUnexpectedEOF
  8037. }
  8038. iNdEx += skippy
  8039. }
  8040. }
  8041. if iNdEx > l {
  8042. return io.ErrUnexpectedEOF
  8043. }
  8044. return nil
  8045. }
  8046. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  8047. l := len(dAtA)
  8048. iNdEx := 0
  8049. for iNdEx < l {
  8050. preIndex := iNdEx
  8051. var wire uint64
  8052. for shift := uint(0); ; shift += 7 {
  8053. if shift >= 64 {
  8054. return ErrIntOverflowTypes
  8055. }
  8056. if iNdEx >= l {
  8057. return io.ErrUnexpectedEOF
  8058. }
  8059. b := dAtA[iNdEx]
  8060. iNdEx++
  8061. wire |= uint64(b&0x7F) << shift
  8062. if b < 0x80 {
  8063. break
  8064. }
  8065. }
  8066. fieldNum := int32(wire >> 3)
  8067. wireType := int(wire & 0x7)
  8068. if wireType == 4 {
  8069. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  8070. }
  8071. if fieldNum <= 0 {
  8072. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8073. }
  8074. switch fieldNum {
  8075. case 1:
  8076. if wireType != 2 {
  8077. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  8078. }
  8079. var byteLen int
  8080. for shift := uint(0); ; shift += 7 {
  8081. if shift >= 64 {
  8082. return ErrIntOverflowTypes
  8083. }
  8084. if iNdEx >= l {
  8085. return io.ErrUnexpectedEOF
  8086. }
  8087. b := dAtA[iNdEx]
  8088. iNdEx++
  8089. byteLen |= int(b&0x7F) << shift
  8090. if b < 0x80 {
  8091. break
  8092. }
  8093. }
  8094. if byteLen < 0 {
  8095. return ErrInvalidLengthTypes
  8096. }
  8097. postIndex := iNdEx + byteLen
  8098. if postIndex < 0 {
  8099. return ErrInvalidLengthTypes
  8100. }
  8101. if postIndex > l {
  8102. return io.ErrUnexpectedEOF
  8103. }
  8104. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  8105. if m.Hash == nil {
  8106. m.Hash = []byte{}
  8107. }
  8108. iNdEx = postIndex
  8109. case 2:
  8110. if wireType != 2 {
  8111. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8112. }
  8113. var msglen int
  8114. for shift := uint(0); ; shift += 7 {
  8115. if shift >= 64 {
  8116. return ErrIntOverflowTypes
  8117. }
  8118. if iNdEx >= l {
  8119. return io.ErrUnexpectedEOF
  8120. }
  8121. b := dAtA[iNdEx]
  8122. iNdEx++
  8123. msglen |= int(b&0x7F) << shift
  8124. if b < 0x80 {
  8125. break
  8126. }
  8127. }
  8128. if msglen < 0 {
  8129. return ErrInvalidLengthTypes
  8130. }
  8131. postIndex := iNdEx + msglen
  8132. if postIndex < 0 {
  8133. return ErrInvalidLengthTypes
  8134. }
  8135. if postIndex > l {
  8136. return io.ErrUnexpectedEOF
  8137. }
  8138. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8139. return err
  8140. }
  8141. iNdEx = postIndex
  8142. case 3:
  8143. if wireType != 2 {
  8144. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  8145. }
  8146. var msglen int
  8147. for shift := uint(0); ; shift += 7 {
  8148. if shift >= 64 {
  8149. return ErrIntOverflowTypes
  8150. }
  8151. if iNdEx >= l {
  8152. return io.ErrUnexpectedEOF
  8153. }
  8154. b := dAtA[iNdEx]
  8155. iNdEx++
  8156. msglen |= int(b&0x7F) << shift
  8157. if b < 0x80 {
  8158. break
  8159. }
  8160. }
  8161. if msglen < 0 {
  8162. return ErrInvalidLengthTypes
  8163. }
  8164. postIndex := iNdEx + msglen
  8165. if postIndex < 0 {
  8166. return ErrInvalidLengthTypes
  8167. }
  8168. if postIndex > l {
  8169. return io.ErrUnexpectedEOF
  8170. }
  8171. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8172. return err
  8173. }
  8174. iNdEx = postIndex
  8175. case 4:
  8176. if wireType != 2 {
  8177. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8178. }
  8179. var msglen int
  8180. for shift := uint(0); ; shift += 7 {
  8181. if shift >= 64 {
  8182. return ErrIntOverflowTypes
  8183. }
  8184. if iNdEx >= l {
  8185. return io.ErrUnexpectedEOF
  8186. }
  8187. b := dAtA[iNdEx]
  8188. iNdEx++
  8189. msglen |= int(b&0x7F) << shift
  8190. if b < 0x80 {
  8191. break
  8192. }
  8193. }
  8194. if msglen < 0 {
  8195. return ErrInvalidLengthTypes
  8196. }
  8197. postIndex := iNdEx + msglen
  8198. if postIndex < 0 {
  8199. return ErrInvalidLengthTypes
  8200. }
  8201. if postIndex > l {
  8202. return io.ErrUnexpectedEOF
  8203. }
  8204. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8205. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8206. return err
  8207. }
  8208. iNdEx = postIndex
  8209. default:
  8210. iNdEx = preIndex
  8211. skippy, err := skipTypes(dAtA[iNdEx:])
  8212. if err != nil {
  8213. return err
  8214. }
  8215. if skippy < 0 {
  8216. return ErrInvalidLengthTypes
  8217. }
  8218. if (iNdEx + skippy) < 0 {
  8219. return ErrInvalidLengthTypes
  8220. }
  8221. if (iNdEx + skippy) > l {
  8222. return io.ErrUnexpectedEOF
  8223. }
  8224. iNdEx += skippy
  8225. }
  8226. }
  8227. if iNdEx > l {
  8228. return io.ErrUnexpectedEOF
  8229. }
  8230. return nil
  8231. }
  8232. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8233. l := len(dAtA)
  8234. iNdEx := 0
  8235. for iNdEx < l {
  8236. preIndex := iNdEx
  8237. var wire uint64
  8238. for shift := uint(0); ; shift += 7 {
  8239. if shift >= 64 {
  8240. return ErrIntOverflowTypes
  8241. }
  8242. if iNdEx >= l {
  8243. return io.ErrUnexpectedEOF
  8244. }
  8245. b := dAtA[iNdEx]
  8246. iNdEx++
  8247. wire |= uint64(b&0x7F) << shift
  8248. if b < 0x80 {
  8249. break
  8250. }
  8251. }
  8252. fieldNum := int32(wire >> 3)
  8253. wireType := int(wire & 0x7)
  8254. if wireType == 4 {
  8255. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8256. }
  8257. if fieldNum <= 0 {
  8258. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8259. }
  8260. switch fieldNum {
  8261. case 1:
  8262. if wireType != 2 {
  8263. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8264. }
  8265. var byteLen int
  8266. for shift := uint(0); ; shift += 7 {
  8267. if shift >= 64 {
  8268. return ErrIntOverflowTypes
  8269. }
  8270. if iNdEx >= l {
  8271. return io.ErrUnexpectedEOF
  8272. }
  8273. b := dAtA[iNdEx]
  8274. iNdEx++
  8275. byteLen |= int(b&0x7F) << shift
  8276. if b < 0x80 {
  8277. break
  8278. }
  8279. }
  8280. if byteLen < 0 {
  8281. return ErrInvalidLengthTypes
  8282. }
  8283. postIndex := iNdEx + byteLen
  8284. if postIndex < 0 {
  8285. return ErrInvalidLengthTypes
  8286. }
  8287. if postIndex > l {
  8288. return io.ErrUnexpectedEOF
  8289. }
  8290. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8291. if m.Tx == nil {
  8292. m.Tx = []byte{}
  8293. }
  8294. iNdEx = postIndex
  8295. case 2:
  8296. if wireType != 0 {
  8297. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8298. }
  8299. m.Type = 0
  8300. for shift := uint(0); ; shift += 7 {
  8301. if shift >= 64 {
  8302. return ErrIntOverflowTypes
  8303. }
  8304. if iNdEx >= l {
  8305. return io.ErrUnexpectedEOF
  8306. }
  8307. b := dAtA[iNdEx]
  8308. iNdEx++
  8309. m.Type |= CheckTxType(b&0x7F) << shift
  8310. if b < 0x80 {
  8311. break
  8312. }
  8313. }
  8314. default:
  8315. iNdEx = preIndex
  8316. skippy, err := skipTypes(dAtA[iNdEx:])
  8317. if err != nil {
  8318. return err
  8319. }
  8320. if skippy < 0 {
  8321. return ErrInvalidLengthTypes
  8322. }
  8323. if (iNdEx + skippy) < 0 {
  8324. return ErrInvalidLengthTypes
  8325. }
  8326. if (iNdEx + skippy) > l {
  8327. return io.ErrUnexpectedEOF
  8328. }
  8329. iNdEx += skippy
  8330. }
  8331. }
  8332. if iNdEx > l {
  8333. return io.ErrUnexpectedEOF
  8334. }
  8335. return nil
  8336. }
  8337. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8338. l := len(dAtA)
  8339. iNdEx := 0
  8340. for iNdEx < l {
  8341. preIndex := iNdEx
  8342. var wire uint64
  8343. for shift := uint(0); ; shift += 7 {
  8344. if shift >= 64 {
  8345. return ErrIntOverflowTypes
  8346. }
  8347. if iNdEx >= l {
  8348. return io.ErrUnexpectedEOF
  8349. }
  8350. b := dAtA[iNdEx]
  8351. iNdEx++
  8352. wire |= uint64(b&0x7F) << shift
  8353. if b < 0x80 {
  8354. break
  8355. }
  8356. }
  8357. fieldNum := int32(wire >> 3)
  8358. wireType := int(wire & 0x7)
  8359. if wireType == 4 {
  8360. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8361. }
  8362. if fieldNum <= 0 {
  8363. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8364. }
  8365. switch fieldNum {
  8366. case 1:
  8367. if wireType != 2 {
  8368. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8369. }
  8370. var byteLen int
  8371. for shift := uint(0); ; shift += 7 {
  8372. if shift >= 64 {
  8373. return ErrIntOverflowTypes
  8374. }
  8375. if iNdEx >= l {
  8376. return io.ErrUnexpectedEOF
  8377. }
  8378. b := dAtA[iNdEx]
  8379. iNdEx++
  8380. byteLen |= int(b&0x7F) << shift
  8381. if b < 0x80 {
  8382. break
  8383. }
  8384. }
  8385. if byteLen < 0 {
  8386. return ErrInvalidLengthTypes
  8387. }
  8388. postIndex := iNdEx + byteLen
  8389. if postIndex < 0 {
  8390. return ErrInvalidLengthTypes
  8391. }
  8392. if postIndex > l {
  8393. return io.ErrUnexpectedEOF
  8394. }
  8395. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8396. if m.Tx == nil {
  8397. m.Tx = []byte{}
  8398. }
  8399. iNdEx = postIndex
  8400. default:
  8401. iNdEx = preIndex
  8402. skippy, err := skipTypes(dAtA[iNdEx:])
  8403. if err != nil {
  8404. return err
  8405. }
  8406. if skippy < 0 {
  8407. return ErrInvalidLengthTypes
  8408. }
  8409. if (iNdEx + skippy) < 0 {
  8410. return ErrInvalidLengthTypes
  8411. }
  8412. if (iNdEx + skippy) > l {
  8413. return io.ErrUnexpectedEOF
  8414. }
  8415. iNdEx += skippy
  8416. }
  8417. }
  8418. if iNdEx > l {
  8419. return io.ErrUnexpectedEOF
  8420. }
  8421. return nil
  8422. }
  8423. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8424. l := len(dAtA)
  8425. iNdEx := 0
  8426. for iNdEx < l {
  8427. preIndex := iNdEx
  8428. var wire uint64
  8429. for shift := uint(0); ; shift += 7 {
  8430. if shift >= 64 {
  8431. return ErrIntOverflowTypes
  8432. }
  8433. if iNdEx >= l {
  8434. return io.ErrUnexpectedEOF
  8435. }
  8436. b := dAtA[iNdEx]
  8437. iNdEx++
  8438. wire |= uint64(b&0x7F) << shift
  8439. if b < 0x80 {
  8440. break
  8441. }
  8442. }
  8443. fieldNum := int32(wire >> 3)
  8444. wireType := int(wire & 0x7)
  8445. if wireType == 4 {
  8446. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8447. }
  8448. if fieldNum <= 0 {
  8449. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8450. }
  8451. switch fieldNum {
  8452. case 1:
  8453. if wireType != 0 {
  8454. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8455. }
  8456. m.Height = 0
  8457. for shift := uint(0); ; shift += 7 {
  8458. if shift >= 64 {
  8459. return ErrIntOverflowTypes
  8460. }
  8461. if iNdEx >= l {
  8462. return io.ErrUnexpectedEOF
  8463. }
  8464. b := dAtA[iNdEx]
  8465. iNdEx++
  8466. m.Height |= int64(b&0x7F) << shift
  8467. if b < 0x80 {
  8468. break
  8469. }
  8470. }
  8471. default:
  8472. iNdEx = preIndex
  8473. skippy, err := skipTypes(dAtA[iNdEx:])
  8474. if err != nil {
  8475. return err
  8476. }
  8477. if skippy < 0 {
  8478. return ErrInvalidLengthTypes
  8479. }
  8480. if (iNdEx + skippy) < 0 {
  8481. return ErrInvalidLengthTypes
  8482. }
  8483. if (iNdEx + skippy) > l {
  8484. return io.ErrUnexpectedEOF
  8485. }
  8486. iNdEx += skippy
  8487. }
  8488. }
  8489. if iNdEx > l {
  8490. return io.ErrUnexpectedEOF
  8491. }
  8492. return nil
  8493. }
  8494. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8495. l := len(dAtA)
  8496. iNdEx := 0
  8497. for iNdEx < l {
  8498. preIndex := iNdEx
  8499. var wire uint64
  8500. for shift := uint(0); ; shift += 7 {
  8501. if shift >= 64 {
  8502. return ErrIntOverflowTypes
  8503. }
  8504. if iNdEx >= l {
  8505. return io.ErrUnexpectedEOF
  8506. }
  8507. b := dAtA[iNdEx]
  8508. iNdEx++
  8509. wire |= uint64(b&0x7F) << shift
  8510. if b < 0x80 {
  8511. break
  8512. }
  8513. }
  8514. fieldNum := int32(wire >> 3)
  8515. wireType := int(wire & 0x7)
  8516. if wireType == 4 {
  8517. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8518. }
  8519. if fieldNum <= 0 {
  8520. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8521. }
  8522. switch fieldNum {
  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 *RequestListSnapshots) 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: RequestListSnapshots: wiretype end group for non-group")
  8570. }
  8571. if fieldNum <= 0 {
  8572. return fmt.Errorf("proto: RequestListSnapshots: 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 *RequestOfferSnapshot) 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: RequestOfferSnapshot: wiretype end group for non-group")
  8622. }
  8623. if fieldNum <= 0 {
  8624. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8625. }
  8626. switch fieldNum {
  8627. case 1:
  8628. if wireType != 2 {
  8629. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8630. }
  8631. var msglen int
  8632. for shift := uint(0); ; shift += 7 {
  8633. if shift >= 64 {
  8634. return ErrIntOverflowTypes
  8635. }
  8636. if iNdEx >= l {
  8637. return io.ErrUnexpectedEOF
  8638. }
  8639. b := dAtA[iNdEx]
  8640. iNdEx++
  8641. msglen |= int(b&0x7F) << shift
  8642. if b < 0x80 {
  8643. break
  8644. }
  8645. }
  8646. if msglen < 0 {
  8647. return ErrInvalidLengthTypes
  8648. }
  8649. postIndex := iNdEx + msglen
  8650. if postIndex < 0 {
  8651. return ErrInvalidLengthTypes
  8652. }
  8653. if postIndex > l {
  8654. return io.ErrUnexpectedEOF
  8655. }
  8656. if m.Snapshot == nil {
  8657. m.Snapshot = &Snapshot{}
  8658. }
  8659. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8660. return err
  8661. }
  8662. iNdEx = postIndex
  8663. case 2:
  8664. if wireType != 2 {
  8665. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8666. }
  8667. var byteLen int
  8668. for shift := uint(0); ; shift += 7 {
  8669. if shift >= 64 {
  8670. return ErrIntOverflowTypes
  8671. }
  8672. if iNdEx >= l {
  8673. return io.ErrUnexpectedEOF
  8674. }
  8675. b := dAtA[iNdEx]
  8676. iNdEx++
  8677. byteLen |= int(b&0x7F) << shift
  8678. if b < 0x80 {
  8679. break
  8680. }
  8681. }
  8682. if byteLen < 0 {
  8683. return ErrInvalidLengthTypes
  8684. }
  8685. postIndex := iNdEx + byteLen
  8686. if postIndex < 0 {
  8687. return ErrInvalidLengthTypes
  8688. }
  8689. if postIndex > l {
  8690. return io.ErrUnexpectedEOF
  8691. }
  8692. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8693. if m.AppHash == nil {
  8694. m.AppHash = []byte{}
  8695. }
  8696. iNdEx = postIndex
  8697. default:
  8698. iNdEx = preIndex
  8699. skippy, err := skipTypes(dAtA[iNdEx:])
  8700. if err != nil {
  8701. return err
  8702. }
  8703. if skippy < 0 {
  8704. return ErrInvalidLengthTypes
  8705. }
  8706. if (iNdEx + skippy) < 0 {
  8707. return ErrInvalidLengthTypes
  8708. }
  8709. if (iNdEx + skippy) > l {
  8710. return io.ErrUnexpectedEOF
  8711. }
  8712. iNdEx += skippy
  8713. }
  8714. }
  8715. if iNdEx > l {
  8716. return io.ErrUnexpectedEOF
  8717. }
  8718. return nil
  8719. }
  8720. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8721. l := len(dAtA)
  8722. iNdEx := 0
  8723. for iNdEx < l {
  8724. preIndex := iNdEx
  8725. var wire uint64
  8726. for shift := uint(0); ; shift += 7 {
  8727. if shift >= 64 {
  8728. return ErrIntOverflowTypes
  8729. }
  8730. if iNdEx >= l {
  8731. return io.ErrUnexpectedEOF
  8732. }
  8733. b := dAtA[iNdEx]
  8734. iNdEx++
  8735. wire |= uint64(b&0x7F) << shift
  8736. if b < 0x80 {
  8737. break
  8738. }
  8739. }
  8740. fieldNum := int32(wire >> 3)
  8741. wireType := int(wire & 0x7)
  8742. if wireType == 4 {
  8743. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8744. }
  8745. if fieldNum <= 0 {
  8746. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8747. }
  8748. switch fieldNum {
  8749. case 1:
  8750. if wireType != 0 {
  8751. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8752. }
  8753. m.Height = 0
  8754. for shift := uint(0); ; shift += 7 {
  8755. if shift >= 64 {
  8756. return ErrIntOverflowTypes
  8757. }
  8758. if iNdEx >= l {
  8759. return io.ErrUnexpectedEOF
  8760. }
  8761. b := dAtA[iNdEx]
  8762. iNdEx++
  8763. m.Height |= uint64(b&0x7F) << shift
  8764. if b < 0x80 {
  8765. break
  8766. }
  8767. }
  8768. case 2:
  8769. if wireType != 0 {
  8770. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8771. }
  8772. m.Format = 0
  8773. for shift := uint(0); ; shift += 7 {
  8774. if shift >= 64 {
  8775. return ErrIntOverflowTypes
  8776. }
  8777. if iNdEx >= l {
  8778. return io.ErrUnexpectedEOF
  8779. }
  8780. b := dAtA[iNdEx]
  8781. iNdEx++
  8782. m.Format |= uint32(b&0x7F) << shift
  8783. if b < 0x80 {
  8784. break
  8785. }
  8786. }
  8787. case 3:
  8788. if wireType != 0 {
  8789. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8790. }
  8791. m.Chunk = 0
  8792. for shift := uint(0); ; shift += 7 {
  8793. if shift >= 64 {
  8794. return ErrIntOverflowTypes
  8795. }
  8796. if iNdEx >= l {
  8797. return io.ErrUnexpectedEOF
  8798. }
  8799. b := dAtA[iNdEx]
  8800. iNdEx++
  8801. m.Chunk |= uint32(b&0x7F) << shift
  8802. if b < 0x80 {
  8803. break
  8804. }
  8805. }
  8806. default:
  8807. iNdEx = preIndex
  8808. skippy, err := skipTypes(dAtA[iNdEx:])
  8809. if err != nil {
  8810. return err
  8811. }
  8812. if skippy < 0 {
  8813. return ErrInvalidLengthTypes
  8814. }
  8815. if (iNdEx + skippy) < 0 {
  8816. return ErrInvalidLengthTypes
  8817. }
  8818. if (iNdEx + skippy) > l {
  8819. return io.ErrUnexpectedEOF
  8820. }
  8821. iNdEx += skippy
  8822. }
  8823. }
  8824. if iNdEx > l {
  8825. return io.ErrUnexpectedEOF
  8826. }
  8827. return nil
  8828. }
  8829. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8830. l := len(dAtA)
  8831. iNdEx := 0
  8832. for iNdEx < l {
  8833. preIndex := iNdEx
  8834. var wire uint64
  8835. for shift := uint(0); ; shift += 7 {
  8836. if shift >= 64 {
  8837. return ErrIntOverflowTypes
  8838. }
  8839. if iNdEx >= l {
  8840. return io.ErrUnexpectedEOF
  8841. }
  8842. b := dAtA[iNdEx]
  8843. iNdEx++
  8844. wire |= uint64(b&0x7F) << shift
  8845. if b < 0x80 {
  8846. break
  8847. }
  8848. }
  8849. fieldNum := int32(wire >> 3)
  8850. wireType := int(wire & 0x7)
  8851. if wireType == 4 {
  8852. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8853. }
  8854. if fieldNum <= 0 {
  8855. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8856. }
  8857. switch fieldNum {
  8858. case 1:
  8859. if wireType != 0 {
  8860. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8861. }
  8862. m.Index = 0
  8863. for shift := uint(0); ; shift += 7 {
  8864. if shift >= 64 {
  8865. return ErrIntOverflowTypes
  8866. }
  8867. if iNdEx >= l {
  8868. return io.ErrUnexpectedEOF
  8869. }
  8870. b := dAtA[iNdEx]
  8871. iNdEx++
  8872. m.Index |= uint32(b&0x7F) << shift
  8873. if b < 0x80 {
  8874. break
  8875. }
  8876. }
  8877. case 2:
  8878. if wireType != 2 {
  8879. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8880. }
  8881. var byteLen int
  8882. for shift := uint(0); ; shift += 7 {
  8883. if shift >= 64 {
  8884. return ErrIntOverflowTypes
  8885. }
  8886. if iNdEx >= l {
  8887. return io.ErrUnexpectedEOF
  8888. }
  8889. b := dAtA[iNdEx]
  8890. iNdEx++
  8891. byteLen |= int(b&0x7F) << shift
  8892. if b < 0x80 {
  8893. break
  8894. }
  8895. }
  8896. if byteLen < 0 {
  8897. return ErrInvalidLengthTypes
  8898. }
  8899. postIndex := iNdEx + byteLen
  8900. if postIndex < 0 {
  8901. return ErrInvalidLengthTypes
  8902. }
  8903. if postIndex > l {
  8904. return io.ErrUnexpectedEOF
  8905. }
  8906. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8907. if m.Chunk == nil {
  8908. m.Chunk = []byte{}
  8909. }
  8910. iNdEx = postIndex
  8911. case 3:
  8912. if wireType != 2 {
  8913. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8914. }
  8915. var stringLen uint64
  8916. for shift := uint(0); ; shift += 7 {
  8917. if shift >= 64 {
  8918. return ErrIntOverflowTypes
  8919. }
  8920. if iNdEx >= l {
  8921. return io.ErrUnexpectedEOF
  8922. }
  8923. b := dAtA[iNdEx]
  8924. iNdEx++
  8925. stringLen |= uint64(b&0x7F) << shift
  8926. if b < 0x80 {
  8927. break
  8928. }
  8929. }
  8930. intStringLen := int(stringLen)
  8931. if intStringLen < 0 {
  8932. return ErrInvalidLengthTypes
  8933. }
  8934. postIndex := iNdEx + intStringLen
  8935. if postIndex < 0 {
  8936. return ErrInvalidLengthTypes
  8937. }
  8938. if postIndex > l {
  8939. return io.ErrUnexpectedEOF
  8940. }
  8941. m.Sender = string(dAtA[iNdEx:postIndex])
  8942. iNdEx = postIndex
  8943. default:
  8944. iNdEx = preIndex
  8945. skippy, err := skipTypes(dAtA[iNdEx:])
  8946. if err != nil {
  8947. return err
  8948. }
  8949. if skippy < 0 {
  8950. return ErrInvalidLengthTypes
  8951. }
  8952. if (iNdEx + skippy) < 0 {
  8953. return ErrInvalidLengthTypes
  8954. }
  8955. if (iNdEx + skippy) > l {
  8956. return io.ErrUnexpectedEOF
  8957. }
  8958. iNdEx += skippy
  8959. }
  8960. }
  8961. if iNdEx > l {
  8962. return io.ErrUnexpectedEOF
  8963. }
  8964. return nil
  8965. }
  8966. func (m *Response) Unmarshal(dAtA []byte) error {
  8967. l := len(dAtA)
  8968. iNdEx := 0
  8969. for iNdEx < l {
  8970. preIndex := iNdEx
  8971. var wire uint64
  8972. for shift := uint(0); ; shift += 7 {
  8973. if shift >= 64 {
  8974. return ErrIntOverflowTypes
  8975. }
  8976. if iNdEx >= l {
  8977. return io.ErrUnexpectedEOF
  8978. }
  8979. b := dAtA[iNdEx]
  8980. iNdEx++
  8981. wire |= uint64(b&0x7F) << shift
  8982. if b < 0x80 {
  8983. break
  8984. }
  8985. }
  8986. fieldNum := int32(wire >> 3)
  8987. wireType := int(wire & 0x7)
  8988. if wireType == 4 {
  8989. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  8990. }
  8991. if fieldNum <= 0 {
  8992. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  8993. }
  8994. switch fieldNum {
  8995. case 1:
  8996. if wireType != 2 {
  8997. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  8998. }
  8999. var msglen int
  9000. for shift := uint(0); ; shift += 7 {
  9001. if shift >= 64 {
  9002. return ErrIntOverflowTypes
  9003. }
  9004. if iNdEx >= l {
  9005. return io.ErrUnexpectedEOF
  9006. }
  9007. b := dAtA[iNdEx]
  9008. iNdEx++
  9009. msglen |= int(b&0x7F) << shift
  9010. if b < 0x80 {
  9011. break
  9012. }
  9013. }
  9014. if msglen < 0 {
  9015. return ErrInvalidLengthTypes
  9016. }
  9017. postIndex := iNdEx + msglen
  9018. if postIndex < 0 {
  9019. return ErrInvalidLengthTypes
  9020. }
  9021. if postIndex > l {
  9022. return io.ErrUnexpectedEOF
  9023. }
  9024. v := &ResponseException{}
  9025. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9026. return err
  9027. }
  9028. m.Value = &Response_Exception{v}
  9029. iNdEx = postIndex
  9030. case 2:
  9031. if wireType != 2 {
  9032. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  9033. }
  9034. var msglen int
  9035. for shift := uint(0); ; shift += 7 {
  9036. if shift >= 64 {
  9037. return ErrIntOverflowTypes
  9038. }
  9039. if iNdEx >= l {
  9040. return io.ErrUnexpectedEOF
  9041. }
  9042. b := dAtA[iNdEx]
  9043. iNdEx++
  9044. msglen |= int(b&0x7F) << shift
  9045. if b < 0x80 {
  9046. break
  9047. }
  9048. }
  9049. if msglen < 0 {
  9050. return ErrInvalidLengthTypes
  9051. }
  9052. postIndex := iNdEx + msglen
  9053. if postIndex < 0 {
  9054. return ErrInvalidLengthTypes
  9055. }
  9056. if postIndex > l {
  9057. return io.ErrUnexpectedEOF
  9058. }
  9059. v := &ResponseEcho{}
  9060. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9061. return err
  9062. }
  9063. m.Value = &Response_Echo{v}
  9064. iNdEx = postIndex
  9065. case 3:
  9066. if wireType != 2 {
  9067. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  9068. }
  9069. var msglen int
  9070. for shift := uint(0); ; shift += 7 {
  9071. if shift >= 64 {
  9072. return ErrIntOverflowTypes
  9073. }
  9074. if iNdEx >= l {
  9075. return io.ErrUnexpectedEOF
  9076. }
  9077. b := dAtA[iNdEx]
  9078. iNdEx++
  9079. msglen |= int(b&0x7F) << shift
  9080. if b < 0x80 {
  9081. break
  9082. }
  9083. }
  9084. if msglen < 0 {
  9085. return ErrInvalidLengthTypes
  9086. }
  9087. postIndex := iNdEx + msglen
  9088. if postIndex < 0 {
  9089. return ErrInvalidLengthTypes
  9090. }
  9091. if postIndex > l {
  9092. return io.ErrUnexpectedEOF
  9093. }
  9094. v := &ResponseFlush{}
  9095. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9096. return err
  9097. }
  9098. m.Value = &Response_Flush{v}
  9099. iNdEx = postIndex
  9100. case 4:
  9101. if wireType != 2 {
  9102. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9103. }
  9104. var msglen int
  9105. for shift := uint(0); ; shift += 7 {
  9106. if shift >= 64 {
  9107. return ErrIntOverflowTypes
  9108. }
  9109. if iNdEx >= l {
  9110. return io.ErrUnexpectedEOF
  9111. }
  9112. b := dAtA[iNdEx]
  9113. iNdEx++
  9114. msglen |= int(b&0x7F) << shift
  9115. if b < 0x80 {
  9116. break
  9117. }
  9118. }
  9119. if msglen < 0 {
  9120. return ErrInvalidLengthTypes
  9121. }
  9122. postIndex := iNdEx + msglen
  9123. if postIndex < 0 {
  9124. return ErrInvalidLengthTypes
  9125. }
  9126. if postIndex > l {
  9127. return io.ErrUnexpectedEOF
  9128. }
  9129. v := &ResponseInfo{}
  9130. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9131. return err
  9132. }
  9133. m.Value = &Response_Info{v}
  9134. iNdEx = postIndex
  9135. case 5:
  9136. if wireType != 2 {
  9137. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  9138. }
  9139. var msglen int
  9140. for shift := uint(0); ; shift += 7 {
  9141. if shift >= 64 {
  9142. return ErrIntOverflowTypes
  9143. }
  9144. if iNdEx >= l {
  9145. return io.ErrUnexpectedEOF
  9146. }
  9147. b := dAtA[iNdEx]
  9148. iNdEx++
  9149. msglen |= int(b&0x7F) << shift
  9150. if b < 0x80 {
  9151. break
  9152. }
  9153. }
  9154. if msglen < 0 {
  9155. return ErrInvalidLengthTypes
  9156. }
  9157. postIndex := iNdEx + msglen
  9158. if postIndex < 0 {
  9159. return ErrInvalidLengthTypes
  9160. }
  9161. if postIndex > l {
  9162. return io.ErrUnexpectedEOF
  9163. }
  9164. v := &ResponseInitChain{}
  9165. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9166. return err
  9167. }
  9168. m.Value = &Response_InitChain{v}
  9169. iNdEx = postIndex
  9170. case 6:
  9171. if wireType != 2 {
  9172. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  9173. }
  9174. var msglen int
  9175. for shift := uint(0); ; shift += 7 {
  9176. if shift >= 64 {
  9177. return ErrIntOverflowTypes
  9178. }
  9179. if iNdEx >= l {
  9180. return io.ErrUnexpectedEOF
  9181. }
  9182. b := dAtA[iNdEx]
  9183. iNdEx++
  9184. msglen |= int(b&0x7F) << shift
  9185. if b < 0x80 {
  9186. break
  9187. }
  9188. }
  9189. if msglen < 0 {
  9190. return ErrInvalidLengthTypes
  9191. }
  9192. postIndex := iNdEx + msglen
  9193. if postIndex < 0 {
  9194. return ErrInvalidLengthTypes
  9195. }
  9196. if postIndex > l {
  9197. return io.ErrUnexpectedEOF
  9198. }
  9199. v := &ResponseQuery{}
  9200. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9201. return err
  9202. }
  9203. m.Value = &Response_Query{v}
  9204. iNdEx = postIndex
  9205. case 7:
  9206. if wireType != 2 {
  9207. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9208. }
  9209. var msglen int
  9210. for shift := uint(0); ; shift += 7 {
  9211. if shift >= 64 {
  9212. return ErrIntOverflowTypes
  9213. }
  9214. if iNdEx >= l {
  9215. return io.ErrUnexpectedEOF
  9216. }
  9217. b := dAtA[iNdEx]
  9218. iNdEx++
  9219. msglen |= int(b&0x7F) << shift
  9220. if b < 0x80 {
  9221. break
  9222. }
  9223. }
  9224. if msglen < 0 {
  9225. return ErrInvalidLengthTypes
  9226. }
  9227. postIndex := iNdEx + msglen
  9228. if postIndex < 0 {
  9229. return ErrInvalidLengthTypes
  9230. }
  9231. if postIndex > l {
  9232. return io.ErrUnexpectedEOF
  9233. }
  9234. v := &ResponseBeginBlock{}
  9235. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9236. return err
  9237. }
  9238. m.Value = &Response_BeginBlock{v}
  9239. iNdEx = postIndex
  9240. case 8:
  9241. if wireType != 2 {
  9242. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9243. }
  9244. var msglen int
  9245. for shift := uint(0); ; shift += 7 {
  9246. if shift >= 64 {
  9247. return ErrIntOverflowTypes
  9248. }
  9249. if iNdEx >= l {
  9250. return io.ErrUnexpectedEOF
  9251. }
  9252. b := dAtA[iNdEx]
  9253. iNdEx++
  9254. msglen |= int(b&0x7F) << shift
  9255. if b < 0x80 {
  9256. break
  9257. }
  9258. }
  9259. if msglen < 0 {
  9260. return ErrInvalidLengthTypes
  9261. }
  9262. postIndex := iNdEx + msglen
  9263. if postIndex < 0 {
  9264. return ErrInvalidLengthTypes
  9265. }
  9266. if postIndex > l {
  9267. return io.ErrUnexpectedEOF
  9268. }
  9269. v := &ResponseCheckTx{}
  9270. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9271. return err
  9272. }
  9273. m.Value = &Response_CheckTx{v}
  9274. iNdEx = postIndex
  9275. case 9:
  9276. if wireType != 2 {
  9277. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9278. }
  9279. var msglen int
  9280. for shift := uint(0); ; shift += 7 {
  9281. if shift >= 64 {
  9282. return ErrIntOverflowTypes
  9283. }
  9284. if iNdEx >= l {
  9285. return io.ErrUnexpectedEOF
  9286. }
  9287. b := dAtA[iNdEx]
  9288. iNdEx++
  9289. msglen |= int(b&0x7F) << shift
  9290. if b < 0x80 {
  9291. break
  9292. }
  9293. }
  9294. if msglen < 0 {
  9295. return ErrInvalidLengthTypes
  9296. }
  9297. postIndex := iNdEx + msglen
  9298. if postIndex < 0 {
  9299. return ErrInvalidLengthTypes
  9300. }
  9301. if postIndex > l {
  9302. return io.ErrUnexpectedEOF
  9303. }
  9304. v := &ResponseDeliverTx{}
  9305. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9306. return err
  9307. }
  9308. m.Value = &Response_DeliverTx{v}
  9309. iNdEx = postIndex
  9310. case 10:
  9311. if wireType != 2 {
  9312. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9313. }
  9314. var msglen int
  9315. for shift := uint(0); ; shift += 7 {
  9316. if shift >= 64 {
  9317. return ErrIntOverflowTypes
  9318. }
  9319. if iNdEx >= l {
  9320. return io.ErrUnexpectedEOF
  9321. }
  9322. b := dAtA[iNdEx]
  9323. iNdEx++
  9324. msglen |= int(b&0x7F) << shift
  9325. if b < 0x80 {
  9326. break
  9327. }
  9328. }
  9329. if msglen < 0 {
  9330. return ErrInvalidLengthTypes
  9331. }
  9332. postIndex := iNdEx + msglen
  9333. if postIndex < 0 {
  9334. return ErrInvalidLengthTypes
  9335. }
  9336. if postIndex > l {
  9337. return io.ErrUnexpectedEOF
  9338. }
  9339. v := &ResponseEndBlock{}
  9340. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9341. return err
  9342. }
  9343. m.Value = &Response_EndBlock{v}
  9344. iNdEx = postIndex
  9345. case 11:
  9346. if wireType != 2 {
  9347. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9348. }
  9349. var msglen int
  9350. for shift := uint(0); ; shift += 7 {
  9351. if shift >= 64 {
  9352. return ErrIntOverflowTypes
  9353. }
  9354. if iNdEx >= l {
  9355. return io.ErrUnexpectedEOF
  9356. }
  9357. b := dAtA[iNdEx]
  9358. iNdEx++
  9359. msglen |= int(b&0x7F) << shift
  9360. if b < 0x80 {
  9361. break
  9362. }
  9363. }
  9364. if msglen < 0 {
  9365. return ErrInvalidLengthTypes
  9366. }
  9367. postIndex := iNdEx + msglen
  9368. if postIndex < 0 {
  9369. return ErrInvalidLengthTypes
  9370. }
  9371. if postIndex > l {
  9372. return io.ErrUnexpectedEOF
  9373. }
  9374. v := &ResponseCommit{}
  9375. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9376. return err
  9377. }
  9378. m.Value = &Response_Commit{v}
  9379. iNdEx = postIndex
  9380. case 12:
  9381. if wireType != 2 {
  9382. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9383. }
  9384. var msglen int
  9385. for shift := uint(0); ; shift += 7 {
  9386. if shift >= 64 {
  9387. return ErrIntOverflowTypes
  9388. }
  9389. if iNdEx >= l {
  9390. return io.ErrUnexpectedEOF
  9391. }
  9392. b := dAtA[iNdEx]
  9393. iNdEx++
  9394. msglen |= int(b&0x7F) << shift
  9395. if b < 0x80 {
  9396. break
  9397. }
  9398. }
  9399. if msglen < 0 {
  9400. return ErrInvalidLengthTypes
  9401. }
  9402. postIndex := iNdEx + msglen
  9403. if postIndex < 0 {
  9404. return ErrInvalidLengthTypes
  9405. }
  9406. if postIndex > l {
  9407. return io.ErrUnexpectedEOF
  9408. }
  9409. v := &ResponseListSnapshots{}
  9410. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9411. return err
  9412. }
  9413. m.Value = &Response_ListSnapshots{v}
  9414. iNdEx = postIndex
  9415. case 13:
  9416. if wireType != 2 {
  9417. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9418. }
  9419. var msglen int
  9420. for shift := uint(0); ; shift += 7 {
  9421. if shift >= 64 {
  9422. return ErrIntOverflowTypes
  9423. }
  9424. if iNdEx >= l {
  9425. return io.ErrUnexpectedEOF
  9426. }
  9427. b := dAtA[iNdEx]
  9428. iNdEx++
  9429. msglen |= int(b&0x7F) << shift
  9430. if b < 0x80 {
  9431. break
  9432. }
  9433. }
  9434. if msglen < 0 {
  9435. return ErrInvalidLengthTypes
  9436. }
  9437. postIndex := iNdEx + msglen
  9438. if postIndex < 0 {
  9439. return ErrInvalidLengthTypes
  9440. }
  9441. if postIndex > l {
  9442. return io.ErrUnexpectedEOF
  9443. }
  9444. v := &ResponseOfferSnapshot{}
  9445. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9446. return err
  9447. }
  9448. m.Value = &Response_OfferSnapshot{v}
  9449. iNdEx = postIndex
  9450. case 14:
  9451. if wireType != 2 {
  9452. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9453. }
  9454. var msglen int
  9455. for shift := uint(0); ; shift += 7 {
  9456. if shift >= 64 {
  9457. return ErrIntOverflowTypes
  9458. }
  9459. if iNdEx >= l {
  9460. return io.ErrUnexpectedEOF
  9461. }
  9462. b := dAtA[iNdEx]
  9463. iNdEx++
  9464. msglen |= int(b&0x7F) << shift
  9465. if b < 0x80 {
  9466. break
  9467. }
  9468. }
  9469. if msglen < 0 {
  9470. return ErrInvalidLengthTypes
  9471. }
  9472. postIndex := iNdEx + msglen
  9473. if postIndex < 0 {
  9474. return ErrInvalidLengthTypes
  9475. }
  9476. if postIndex > l {
  9477. return io.ErrUnexpectedEOF
  9478. }
  9479. v := &ResponseLoadSnapshotChunk{}
  9480. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9481. return err
  9482. }
  9483. m.Value = &Response_LoadSnapshotChunk{v}
  9484. iNdEx = postIndex
  9485. case 15:
  9486. if wireType != 2 {
  9487. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9488. }
  9489. var msglen int
  9490. for shift := uint(0); ; shift += 7 {
  9491. if shift >= 64 {
  9492. return ErrIntOverflowTypes
  9493. }
  9494. if iNdEx >= l {
  9495. return io.ErrUnexpectedEOF
  9496. }
  9497. b := dAtA[iNdEx]
  9498. iNdEx++
  9499. msglen |= int(b&0x7F) << shift
  9500. if b < 0x80 {
  9501. break
  9502. }
  9503. }
  9504. if msglen < 0 {
  9505. return ErrInvalidLengthTypes
  9506. }
  9507. postIndex := iNdEx + msglen
  9508. if postIndex < 0 {
  9509. return ErrInvalidLengthTypes
  9510. }
  9511. if postIndex > l {
  9512. return io.ErrUnexpectedEOF
  9513. }
  9514. v := &ResponseApplySnapshotChunk{}
  9515. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9516. return err
  9517. }
  9518. m.Value = &Response_ApplySnapshotChunk{v}
  9519. iNdEx = postIndex
  9520. default:
  9521. iNdEx = preIndex
  9522. skippy, err := skipTypes(dAtA[iNdEx:])
  9523. if err != nil {
  9524. return err
  9525. }
  9526. if skippy < 0 {
  9527. return ErrInvalidLengthTypes
  9528. }
  9529. if (iNdEx + skippy) < 0 {
  9530. return ErrInvalidLengthTypes
  9531. }
  9532. if (iNdEx + skippy) > l {
  9533. return io.ErrUnexpectedEOF
  9534. }
  9535. iNdEx += skippy
  9536. }
  9537. }
  9538. if iNdEx > l {
  9539. return io.ErrUnexpectedEOF
  9540. }
  9541. return nil
  9542. }
  9543. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9544. l := len(dAtA)
  9545. iNdEx := 0
  9546. for iNdEx < l {
  9547. preIndex := iNdEx
  9548. var wire uint64
  9549. for shift := uint(0); ; shift += 7 {
  9550. if shift >= 64 {
  9551. return ErrIntOverflowTypes
  9552. }
  9553. if iNdEx >= l {
  9554. return io.ErrUnexpectedEOF
  9555. }
  9556. b := dAtA[iNdEx]
  9557. iNdEx++
  9558. wire |= uint64(b&0x7F) << shift
  9559. if b < 0x80 {
  9560. break
  9561. }
  9562. }
  9563. fieldNum := int32(wire >> 3)
  9564. wireType := int(wire & 0x7)
  9565. if wireType == 4 {
  9566. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9567. }
  9568. if fieldNum <= 0 {
  9569. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9570. }
  9571. switch fieldNum {
  9572. case 1:
  9573. if wireType != 2 {
  9574. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9575. }
  9576. var stringLen uint64
  9577. for shift := uint(0); ; shift += 7 {
  9578. if shift >= 64 {
  9579. return ErrIntOverflowTypes
  9580. }
  9581. if iNdEx >= l {
  9582. return io.ErrUnexpectedEOF
  9583. }
  9584. b := dAtA[iNdEx]
  9585. iNdEx++
  9586. stringLen |= uint64(b&0x7F) << shift
  9587. if b < 0x80 {
  9588. break
  9589. }
  9590. }
  9591. intStringLen := int(stringLen)
  9592. if intStringLen < 0 {
  9593. return ErrInvalidLengthTypes
  9594. }
  9595. postIndex := iNdEx + intStringLen
  9596. if postIndex < 0 {
  9597. return ErrInvalidLengthTypes
  9598. }
  9599. if postIndex > l {
  9600. return io.ErrUnexpectedEOF
  9601. }
  9602. m.Error = string(dAtA[iNdEx:postIndex])
  9603. iNdEx = postIndex
  9604. default:
  9605. iNdEx = preIndex
  9606. skippy, err := skipTypes(dAtA[iNdEx:])
  9607. if err != nil {
  9608. return err
  9609. }
  9610. if skippy < 0 {
  9611. return ErrInvalidLengthTypes
  9612. }
  9613. if (iNdEx + skippy) < 0 {
  9614. return ErrInvalidLengthTypes
  9615. }
  9616. if (iNdEx + skippy) > l {
  9617. return io.ErrUnexpectedEOF
  9618. }
  9619. iNdEx += skippy
  9620. }
  9621. }
  9622. if iNdEx > l {
  9623. return io.ErrUnexpectedEOF
  9624. }
  9625. return nil
  9626. }
  9627. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9628. l := len(dAtA)
  9629. iNdEx := 0
  9630. for iNdEx < l {
  9631. preIndex := iNdEx
  9632. var wire uint64
  9633. for shift := uint(0); ; shift += 7 {
  9634. if shift >= 64 {
  9635. return ErrIntOverflowTypes
  9636. }
  9637. if iNdEx >= l {
  9638. return io.ErrUnexpectedEOF
  9639. }
  9640. b := dAtA[iNdEx]
  9641. iNdEx++
  9642. wire |= uint64(b&0x7F) << shift
  9643. if b < 0x80 {
  9644. break
  9645. }
  9646. }
  9647. fieldNum := int32(wire >> 3)
  9648. wireType := int(wire & 0x7)
  9649. if wireType == 4 {
  9650. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9651. }
  9652. if fieldNum <= 0 {
  9653. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9654. }
  9655. switch fieldNum {
  9656. case 1:
  9657. if wireType != 2 {
  9658. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9659. }
  9660. var stringLen uint64
  9661. for shift := uint(0); ; shift += 7 {
  9662. if shift >= 64 {
  9663. return ErrIntOverflowTypes
  9664. }
  9665. if iNdEx >= l {
  9666. return io.ErrUnexpectedEOF
  9667. }
  9668. b := dAtA[iNdEx]
  9669. iNdEx++
  9670. stringLen |= uint64(b&0x7F) << shift
  9671. if b < 0x80 {
  9672. break
  9673. }
  9674. }
  9675. intStringLen := int(stringLen)
  9676. if intStringLen < 0 {
  9677. return ErrInvalidLengthTypes
  9678. }
  9679. postIndex := iNdEx + intStringLen
  9680. if postIndex < 0 {
  9681. return ErrInvalidLengthTypes
  9682. }
  9683. if postIndex > l {
  9684. return io.ErrUnexpectedEOF
  9685. }
  9686. m.Message = string(dAtA[iNdEx:postIndex])
  9687. iNdEx = postIndex
  9688. default:
  9689. iNdEx = preIndex
  9690. skippy, err := skipTypes(dAtA[iNdEx:])
  9691. if err != nil {
  9692. return err
  9693. }
  9694. if skippy < 0 {
  9695. return ErrInvalidLengthTypes
  9696. }
  9697. if (iNdEx + skippy) < 0 {
  9698. return ErrInvalidLengthTypes
  9699. }
  9700. if (iNdEx + skippy) > l {
  9701. return io.ErrUnexpectedEOF
  9702. }
  9703. iNdEx += skippy
  9704. }
  9705. }
  9706. if iNdEx > l {
  9707. return io.ErrUnexpectedEOF
  9708. }
  9709. return nil
  9710. }
  9711. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9712. l := len(dAtA)
  9713. iNdEx := 0
  9714. for iNdEx < l {
  9715. preIndex := iNdEx
  9716. var wire uint64
  9717. for shift := uint(0); ; shift += 7 {
  9718. if shift >= 64 {
  9719. return ErrIntOverflowTypes
  9720. }
  9721. if iNdEx >= l {
  9722. return io.ErrUnexpectedEOF
  9723. }
  9724. b := dAtA[iNdEx]
  9725. iNdEx++
  9726. wire |= uint64(b&0x7F) << shift
  9727. if b < 0x80 {
  9728. break
  9729. }
  9730. }
  9731. fieldNum := int32(wire >> 3)
  9732. wireType := int(wire & 0x7)
  9733. if wireType == 4 {
  9734. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9735. }
  9736. if fieldNum <= 0 {
  9737. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9738. }
  9739. switch fieldNum {
  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 *ResponseInfo) 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: ResponseInfo: wiretype end group for non-group")
  9787. }
  9788. if fieldNum <= 0 {
  9789. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9790. }
  9791. switch fieldNum {
  9792. case 1:
  9793. if wireType != 2 {
  9794. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9795. }
  9796. var stringLen uint64
  9797. for shift := uint(0); ; shift += 7 {
  9798. if shift >= 64 {
  9799. return ErrIntOverflowTypes
  9800. }
  9801. if iNdEx >= l {
  9802. return io.ErrUnexpectedEOF
  9803. }
  9804. b := dAtA[iNdEx]
  9805. iNdEx++
  9806. stringLen |= uint64(b&0x7F) << shift
  9807. if b < 0x80 {
  9808. break
  9809. }
  9810. }
  9811. intStringLen := int(stringLen)
  9812. if intStringLen < 0 {
  9813. return ErrInvalidLengthTypes
  9814. }
  9815. postIndex := iNdEx + intStringLen
  9816. if postIndex < 0 {
  9817. return ErrInvalidLengthTypes
  9818. }
  9819. if postIndex > l {
  9820. return io.ErrUnexpectedEOF
  9821. }
  9822. m.Data = string(dAtA[iNdEx:postIndex])
  9823. iNdEx = postIndex
  9824. case 2:
  9825. if wireType != 2 {
  9826. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9827. }
  9828. var stringLen uint64
  9829. for shift := uint(0); ; shift += 7 {
  9830. if shift >= 64 {
  9831. return ErrIntOverflowTypes
  9832. }
  9833. if iNdEx >= l {
  9834. return io.ErrUnexpectedEOF
  9835. }
  9836. b := dAtA[iNdEx]
  9837. iNdEx++
  9838. stringLen |= uint64(b&0x7F) << shift
  9839. if b < 0x80 {
  9840. break
  9841. }
  9842. }
  9843. intStringLen := int(stringLen)
  9844. if intStringLen < 0 {
  9845. return ErrInvalidLengthTypes
  9846. }
  9847. postIndex := iNdEx + intStringLen
  9848. if postIndex < 0 {
  9849. return ErrInvalidLengthTypes
  9850. }
  9851. if postIndex > l {
  9852. return io.ErrUnexpectedEOF
  9853. }
  9854. m.Version = string(dAtA[iNdEx:postIndex])
  9855. iNdEx = postIndex
  9856. case 3:
  9857. if wireType != 0 {
  9858. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9859. }
  9860. m.AppVersion = 0
  9861. for shift := uint(0); ; shift += 7 {
  9862. if shift >= 64 {
  9863. return ErrIntOverflowTypes
  9864. }
  9865. if iNdEx >= l {
  9866. return io.ErrUnexpectedEOF
  9867. }
  9868. b := dAtA[iNdEx]
  9869. iNdEx++
  9870. m.AppVersion |= uint64(b&0x7F) << shift
  9871. if b < 0x80 {
  9872. break
  9873. }
  9874. }
  9875. case 4:
  9876. if wireType != 0 {
  9877. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9878. }
  9879. m.LastBlockHeight = 0
  9880. for shift := uint(0); ; shift += 7 {
  9881. if shift >= 64 {
  9882. return ErrIntOverflowTypes
  9883. }
  9884. if iNdEx >= l {
  9885. return io.ErrUnexpectedEOF
  9886. }
  9887. b := dAtA[iNdEx]
  9888. iNdEx++
  9889. m.LastBlockHeight |= int64(b&0x7F) << shift
  9890. if b < 0x80 {
  9891. break
  9892. }
  9893. }
  9894. case 5:
  9895. if wireType != 2 {
  9896. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9897. }
  9898. var byteLen int
  9899. for shift := uint(0); ; shift += 7 {
  9900. if shift >= 64 {
  9901. return ErrIntOverflowTypes
  9902. }
  9903. if iNdEx >= l {
  9904. return io.ErrUnexpectedEOF
  9905. }
  9906. b := dAtA[iNdEx]
  9907. iNdEx++
  9908. byteLen |= int(b&0x7F) << shift
  9909. if b < 0x80 {
  9910. break
  9911. }
  9912. }
  9913. if byteLen < 0 {
  9914. return ErrInvalidLengthTypes
  9915. }
  9916. postIndex := iNdEx + byteLen
  9917. if postIndex < 0 {
  9918. return ErrInvalidLengthTypes
  9919. }
  9920. if postIndex > l {
  9921. return io.ErrUnexpectedEOF
  9922. }
  9923. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9924. if m.LastBlockAppHash == nil {
  9925. m.LastBlockAppHash = []byte{}
  9926. }
  9927. iNdEx = postIndex
  9928. default:
  9929. iNdEx = preIndex
  9930. skippy, err := skipTypes(dAtA[iNdEx:])
  9931. if err != nil {
  9932. return err
  9933. }
  9934. if skippy < 0 {
  9935. return ErrInvalidLengthTypes
  9936. }
  9937. if (iNdEx + skippy) < 0 {
  9938. return ErrInvalidLengthTypes
  9939. }
  9940. if (iNdEx + skippy) > l {
  9941. return io.ErrUnexpectedEOF
  9942. }
  9943. iNdEx += skippy
  9944. }
  9945. }
  9946. if iNdEx > l {
  9947. return io.ErrUnexpectedEOF
  9948. }
  9949. return nil
  9950. }
  9951. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  9952. l := len(dAtA)
  9953. iNdEx := 0
  9954. for iNdEx < l {
  9955. preIndex := iNdEx
  9956. var wire uint64
  9957. for shift := uint(0); ; shift += 7 {
  9958. if shift >= 64 {
  9959. return ErrIntOverflowTypes
  9960. }
  9961. if iNdEx >= l {
  9962. return io.ErrUnexpectedEOF
  9963. }
  9964. b := dAtA[iNdEx]
  9965. iNdEx++
  9966. wire |= uint64(b&0x7F) << shift
  9967. if b < 0x80 {
  9968. break
  9969. }
  9970. }
  9971. fieldNum := int32(wire >> 3)
  9972. wireType := int(wire & 0x7)
  9973. if wireType == 4 {
  9974. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  9975. }
  9976. if fieldNum <= 0 {
  9977. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  9978. }
  9979. switch fieldNum {
  9980. case 1:
  9981. if wireType != 2 {
  9982. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  9983. }
  9984. var msglen int
  9985. for shift := uint(0); ; shift += 7 {
  9986. if shift >= 64 {
  9987. return ErrIntOverflowTypes
  9988. }
  9989. if iNdEx >= l {
  9990. return io.ErrUnexpectedEOF
  9991. }
  9992. b := dAtA[iNdEx]
  9993. iNdEx++
  9994. msglen |= int(b&0x7F) << shift
  9995. if b < 0x80 {
  9996. break
  9997. }
  9998. }
  9999. if msglen < 0 {
  10000. return ErrInvalidLengthTypes
  10001. }
  10002. postIndex := iNdEx + msglen
  10003. if postIndex < 0 {
  10004. return ErrInvalidLengthTypes
  10005. }
  10006. if postIndex > l {
  10007. return io.ErrUnexpectedEOF
  10008. }
  10009. if m.ConsensusParams == nil {
  10010. m.ConsensusParams = &ConsensusParams{}
  10011. }
  10012. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10013. return err
  10014. }
  10015. iNdEx = postIndex
  10016. case 2:
  10017. if wireType != 2 {
  10018. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  10019. }
  10020. var msglen int
  10021. for shift := uint(0); ; shift += 7 {
  10022. if shift >= 64 {
  10023. return ErrIntOverflowTypes
  10024. }
  10025. if iNdEx >= l {
  10026. return io.ErrUnexpectedEOF
  10027. }
  10028. b := dAtA[iNdEx]
  10029. iNdEx++
  10030. msglen |= int(b&0x7F) << shift
  10031. if b < 0x80 {
  10032. break
  10033. }
  10034. }
  10035. if msglen < 0 {
  10036. return ErrInvalidLengthTypes
  10037. }
  10038. postIndex := iNdEx + msglen
  10039. if postIndex < 0 {
  10040. return ErrInvalidLengthTypes
  10041. }
  10042. if postIndex > l {
  10043. return io.ErrUnexpectedEOF
  10044. }
  10045. m.Validators = append(m.Validators, ValidatorUpdate{})
  10046. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10047. return err
  10048. }
  10049. iNdEx = postIndex
  10050. case 3:
  10051. if wireType != 2 {
  10052. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  10053. }
  10054. var byteLen int
  10055. for shift := uint(0); ; shift += 7 {
  10056. if shift >= 64 {
  10057. return ErrIntOverflowTypes
  10058. }
  10059. if iNdEx >= l {
  10060. return io.ErrUnexpectedEOF
  10061. }
  10062. b := dAtA[iNdEx]
  10063. iNdEx++
  10064. byteLen |= int(b&0x7F) << shift
  10065. if b < 0x80 {
  10066. break
  10067. }
  10068. }
  10069. if byteLen < 0 {
  10070. return ErrInvalidLengthTypes
  10071. }
  10072. postIndex := iNdEx + byteLen
  10073. if postIndex < 0 {
  10074. return ErrInvalidLengthTypes
  10075. }
  10076. if postIndex > l {
  10077. return io.ErrUnexpectedEOF
  10078. }
  10079. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  10080. if m.AppHash == nil {
  10081. m.AppHash = []byte{}
  10082. }
  10083. iNdEx = postIndex
  10084. default:
  10085. iNdEx = preIndex
  10086. skippy, err := skipTypes(dAtA[iNdEx:])
  10087. if err != nil {
  10088. return err
  10089. }
  10090. if skippy < 0 {
  10091. return ErrInvalidLengthTypes
  10092. }
  10093. if (iNdEx + skippy) < 0 {
  10094. return ErrInvalidLengthTypes
  10095. }
  10096. if (iNdEx + skippy) > l {
  10097. return io.ErrUnexpectedEOF
  10098. }
  10099. iNdEx += skippy
  10100. }
  10101. }
  10102. if iNdEx > l {
  10103. return io.ErrUnexpectedEOF
  10104. }
  10105. return nil
  10106. }
  10107. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  10108. l := len(dAtA)
  10109. iNdEx := 0
  10110. for iNdEx < l {
  10111. preIndex := iNdEx
  10112. var wire uint64
  10113. for shift := uint(0); ; shift += 7 {
  10114. if shift >= 64 {
  10115. return ErrIntOverflowTypes
  10116. }
  10117. if iNdEx >= l {
  10118. return io.ErrUnexpectedEOF
  10119. }
  10120. b := dAtA[iNdEx]
  10121. iNdEx++
  10122. wire |= uint64(b&0x7F) << shift
  10123. if b < 0x80 {
  10124. break
  10125. }
  10126. }
  10127. fieldNum := int32(wire >> 3)
  10128. wireType := int(wire & 0x7)
  10129. if wireType == 4 {
  10130. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  10131. }
  10132. if fieldNum <= 0 {
  10133. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  10134. }
  10135. switch fieldNum {
  10136. case 1:
  10137. if wireType != 0 {
  10138. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10139. }
  10140. m.Code = 0
  10141. for shift := uint(0); ; shift += 7 {
  10142. if shift >= 64 {
  10143. return ErrIntOverflowTypes
  10144. }
  10145. if iNdEx >= l {
  10146. return io.ErrUnexpectedEOF
  10147. }
  10148. b := dAtA[iNdEx]
  10149. iNdEx++
  10150. m.Code |= uint32(b&0x7F) << shift
  10151. if b < 0x80 {
  10152. break
  10153. }
  10154. }
  10155. case 3:
  10156. if wireType != 2 {
  10157. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10158. }
  10159. var stringLen uint64
  10160. for shift := uint(0); ; shift += 7 {
  10161. if shift >= 64 {
  10162. return ErrIntOverflowTypes
  10163. }
  10164. if iNdEx >= l {
  10165. return io.ErrUnexpectedEOF
  10166. }
  10167. b := dAtA[iNdEx]
  10168. iNdEx++
  10169. stringLen |= uint64(b&0x7F) << shift
  10170. if b < 0x80 {
  10171. break
  10172. }
  10173. }
  10174. intStringLen := int(stringLen)
  10175. if intStringLen < 0 {
  10176. return ErrInvalidLengthTypes
  10177. }
  10178. postIndex := iNdEx + intStringLen
  10179. if postIndex < 0 {
  10180. return ErrInvalidLengthTypes
  10181. }
  10182. if postIndex > l {
  10183. return io.ErrUnexpectedEOF
  10184. }
  10185. m.Log = string(dAtA[iNdEx:postIndex])
  10186. iNdEx = postIndex
  10187. case 4:
  10188. if wireType != 2 {
  10189. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10190. }
  10191. var stringLen uint64
  10192. for shift := uint(0); ; shift += 7 {
  10193. if shift >= 64 {
  10194. return ErrIntOverflowTypes
  10195. }
  10196. if iNdEx >= l {
  10197. return io.ErrUnexpectedEOF
  10198. }
  10199. b := dAtA[iNdEx]
  10200. iNdEx++
  10201. stringLen |= uint64(b&0x7F) << shift
  10202. if b < 0x80 {
  10203. break
  10204. }
  10205. }
  10206. intStringLen := int(stringLen)
  10207. if intStringLen < 0 {
  10208. return ErrInvalidLengthTypes
  10209. }
  10210. postIndex := iNdEx + intStringLen
  10211. if postIndex < 0 {
  10212. return ErrInvalidLengthTypes
  10213. }
  10214. if postIndex > l {
  10215. return io.ErrUnexpectedEOF
  10216. }
  10217. m.Info = string(dAtA[iNdEx:postIndex])
  10218. iNdEx = postIndex
  10219. case 5:
  10220. if wireType != 0 {
  10221. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10222. }
  10223. m.Index = 0
  10224. for shift := uint(0); ; shift += 7 {
  10225. if shift >= 64 {
  10226. return ErrIntOverflowTypes
  10227. }
  10228. if iNdEx >= l {
  10229. return io.ErrUnexpectedEOF
  10230. }
  10231. b := dAtA[iNdEx]
  10232. iNdEx++
  10233. m.Index |= int64(b&0x7F) << shift
  10234. if b < 0x80 {
  10235. break
  10236. }
  10237. }
  10238. case 6:
  10239. if wireType != 2 {
  10240. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10241. }
  10242. var byteLen int
  10243. for shift := uint(0); ; shift += 7 {
  10244. if shift >= 64 {
  10245. return ErrIntOverflowTypes
  10246. }
  10247. if iNdEx >= l {
  10248. return io.ErrUnexpectedEOF
  10249. }
  10250. b := dAtA[iNdEx]
  10251. iNdEx++
  10252. byteLen |= int(b&0x7F) << shift
  10253. if b < 0x80 {
  10254. break
  10255. }
  10256. }
  10257. if byteLen < 0 {
  10258. return ErrInvalidLengthTypes
  10259. }
  10260. postIndex := iNdEx + byteLen
  10261. if postIndex < 0 {
  10262. return ErrInvalidLengthTypes
  10263. }
  10264. if postIndex > l {
  10265. return io.ErrUnexpectedEOF
  10266. }
  10267. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10268. if m.Key == nil {
  10269. m.Key = []byte{}
  10270. }
  10271. iNdEx = postIndex
  10272. case 7:
  10273. if wireType != 2 {
  10274. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10275. }
  10276. var byteLen int
  10277. for shift := uint(0); ; shift += 7 {
  10278. if shift >= 64 {
  10279. return ErrIntOverflowTypes
  10280. }
  10281. if iNdEx >= l {
  10282. return io.ErrUnexpectedEOF
  10283. }
  10284. b := dAtA[iNdEx]
  10285. iNdEx++
  10286. byteLen |= int(b&0x7F) << shift
  10287. if b < 0x80 {
  10288. break
  10289. }
  10290. }
  10291. if byteLen < 0 {
  10292. return ErrInvalidLengthTypes
  10293. }
  10294. postIndex := iNdEx + byteLen
  10295. if postIndex < 0 {
  10296. return ErrInvalidLengthTypes
  10297. }
  10298. if postIndex > l {
  10299. return io.ErrUnexpectedEOF
  10300. }
  10301. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10302. if m.Value == nil {
  10303. m.Value = []byte{}
  10304. }
  10305. iNdEx = postIndex
  10306. case 8:
  10307. if wireType != 2 {
  10308. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10309. }
  10310. var msglen int
  10311. for shift := uint(0); ; shift += 7 {
  10312. if shift >= 64 {
  10313. return ErrIntOverflowTypes
  10314. }
  10315. if iNdEx >= l {
  10316. return io.ErrUnexpectedEOF
  10317. }
  10318. b := dAtA[iNdEx]
  10319. iNdEx++
  10320. msglen |= int(b&0x7F) << shift
  10321. if b < 0x80 {
  10322. break
  10323. }
  10324. }
  10325. if msglen < 0 {
  10326. return ErrInvalidLengthTypes
  10327. }
  10328. postIndex := iNdEx + msglen
  10329. if postIndex < 0 {
  10330. return ErrInvalidLengthTypes
  10331. }
  10332. if postIndex > l {
  10333. return io.ErrUnexpectedEOF
  10334. }
  10335. if m.ProofOps == nil {
  10336. m.ProofOps = &crypto.ProofOps{}
  10337. }
  10338. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10339. return err
  10340. }
  10341. iNdEx = postIndex
  10342. case 9:
  10343. if wireType != 0 {
  10344. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10345. }
  10346. m.Height = 0
  10347. for shift := uint(0); ; shift += 7 {
  10348. if shift >= 64 {
  10349. return ErrIntOverflowTypes
  10350. }
  10351. if iNdEx >= l {
  10352. return io.ErrUnexpectedEOF
  10353. }
  10354. b := dAtA[iNdEx]
  10355. iNdEx++
  10356. m.Height |= int64(b&0x7F) << shift
  10357. if b < 0x80 {
  10358. break
  10359. }
  10360. }
  10361. case 10:
  10362. if wireType != 2 {
  10363. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10364. }
  10365. var stringLen uint64
  10366. for shift := uint(0); ; shift += 7 {
  10367. if shift >= 64 {
  10368. return ErrIntOverflowTypes
  10369. }
  10370. if iNdEx >= l {
  10371. return io.ErrUnexpectedEOF
  10372. }
  10373. b := dAtA[iNdEx]
  10374. iNdEx++
  10375. stringLen |= uint64(b&0x7F) << shift
  10376. if b < 0x80 {
  10377. break
  10378. }
  10379. }
  10380. intStringLen := int(stringLen)
  10381. if intStringLen < 0 {
  10382. return ErrInvalidLengthTypes
  10383. }
  10384. postIndex := iNdEx + intStringLen
  10385. if postIndex < 0 {
  10386. return ErrInvalidLengthTypes
  10387. }
  10388. if postIndex > l {
  10389. return io.ErrUnexpectedEOF
  10390. }
  10391. m.Codespace = string(dAtA[iNdEx:postIndex])
  10392. iNdEx = postIndex
  10393. default:
  10394. iNdEx = preIndex
  10395. skippy, err := skipTypes(dAtA[iNdEx:])
  10396. if err != nil {
  10397. return err
  10398. }
  10399. if skippy < 0 {
  10400. return ErrInvalidLengthTypes
  10401. }
  10402. if (iNdEx + skippy) < 0 {
  10403. return ErrInvalidLengthTypes
  10404. }
  10405. if (iNdEx + skippy) > l {
  10406. return io.ErrUnexpectedEOF
  10407. }
  10408. iNdEx += skippy
  10409. }
  10410. }
  10411. if iNdEx > l {
  10412. return io.ErrUnexpectedEOF
  10413. }
  10414. return nil
  10415. }
  10416. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10417. l := len(dAtA)
  10418. iNdEx := 0
  10419. for iNdEx < l {
  10420. preIndex := iNdEx
  10421. var wire uint64
  10422. for shift := uint(0); ; shift += 7 {
  10423. if shift >= 64 {
  10424. return ErrIntOverflowTypes
  10425. }
  10426. if iNdEx >= l {
  10427. return io.ErrUnexpectedEOF
  10428. }
  10429. b := dAtA[iNdEx]
  10430. iNdEx++
  10431. wire |= uint64(b&0x7F) << shift
  10432. if b < 0x80 {
  10433. break
  10434. }
  10435. }
  10436. fieldNum := int32(wire >> 3)
  10437. wireType := int(wire & 0x7)
  10438. if wireType == 4 {
  10439. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10440. }
  10441. if fieldNum <= 0 {
  10442. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10443. }
  10444. switch fieldNum {
  10445. case 1:
  10446. if wireType != 2 {
  10447. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10448. }
  10449. var msglen int
  10450. for shift := uint(0); ; shift += 7 {
  10451. if shift >= 64 {
  10452. return ErrIntOverflowTypes
  10453. }
  10454. if iNdEx >= l {
  10455. return io.ErrUnexpectedEOF
  10456. }
  10457. b := dAtA[iNdEx]
  10458. iNdEx++
  10459. msglen |= int(b&0x7F) << shift
  10460. if b < 0x80 {
  10461. break
  10462. }
  10463. }
  10464. if msglen < 0 {
  10465. return ErrInvalidLengthTypes
  10466. }
  10467. postIndex := iNdEx + msglen
  10468. if postIndex < 0 {
  10469. return ErrInvalidLengthTypes
  10470. }
  10471. if postIndex > l {
  10472. return io.ErrUnexpectedEOF
  10473. }
  10474. m.Events = append(m.Events, Event{})
  10475. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10476. return err
  10477. }
  10478. iNdEx = postIndex
  10479. default:
  10480. iNdEx = preIndex
  10481. skippy, err := skipTypes(dAtA[iNdEx:])
  10482. if err != nil {
  10483. return err
  10484. }
  10485. if skippy < 0 {
  10486. return ErrInvalidLengthTypes
  10487. }
  10488. if (iNdEx + skippy) < 0 {
  10489. return ErrInvalidLengthTypes
  10490. }
  10491. if (iNdEx + skippy) > l {
  10492. return io.ErrUnexpectedEOF
  10493. }
  10494. iNdEx += skippy
  10495. }
  10496. }
  10497. if iNdEx > l {
  10498. return io.ErrUnexpectedEOF
  10499. }
  10500. return nil
  10501. }
  10502. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10503. l := len(dAtA)
  10504. iNdEx := 0
  10505. for iNdEx < l {
  10506. preIndex := iNdEx
  10507. var wire uint64
  10508. for shift := uint(0); ; shift += 7 {
  10509. if shift >= 64 {
  10510. return ErrIntOverflowTypes
  10511. }
  10512. if iNdEx >= l {
  10513. return io.ErrUnexpectedEOF
  10514. }
  10515. b := dAtA[iNdEx]
  10516. iNdEx++
  10517. wire |= uint64(b&0x7F) << shift
  10518. if b < 0x80 {
  10519. break
  10520. }
  10521. }
  10522. fieldNum := int32(wire >> 3)
  10523. wireType := int(wire & 0x7)
  10524. if wireType == 4 {
  10525. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10526. }
  10527. if fieldNum <= 0 {
  10528. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10529. }
  10530. switch fieldNum {
  10531. case 1:
  10532. if wireType != 0 {
  10533. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10534. }
  10535. m.Code = 0
  10536. for shift := uint(0); ; shift += 7 {
  10537. if shift >= 64 {
  10538. return ErrIntOverflowTypes
  10539. }
  10540. if iNdEx >= l {
  10541. return io.ErrUnexpectedEOF
  10542. }
  10543. b := dAtA[iNdEx]
  10544. iNdEx++
  10545. m.Code |= uint32(b&0x7F) << shift
  10546. if b < 0x80 {
  10547. break
  10548. }
  10549. }
  10550. case 2:
  10551. if wireType != 2 {
  10552. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10553. }
  10554. var byteLen int
  10555. for shift := uint(0); ; shift += 7 {
  10556. if shift >= 64 {
  10557. return ErrIntOverflowTypes
  10558. }
  10559. if iNdEx >= l {
  10560. return io.ErrUnexpectedEOF
  10561. }
  10562. b := dAtA[iNdEx]
  10563. iNdEx++
  10564. byteLen |= int(b&0x7F) << shift
  10565. if b < 0x80 {
  10566. break
  10567. }
  10568. }
  10569. if byteLen < 0 {
  10570. return ErrInvalidLengthTypes
  10571. }
  10572. postIndex := iNdEx + byteLen
  10573. if postIndex < 0 {
  10574. return ErrInvalidLengthTypes
  10575. }
  10576. if postIndex > l {
  10577. return io.ErrUnexpectedEOF
  10578. }
  10579. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10580. if m.Data == nil {
  10581. m.Data = []byte{}
  10582. }
  10583. iNdEx = postIndex
  10584. case 3:
  10585. if wireType != 2 {
  10586. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10587. }
  10588. var stringLen uint64
  10589. for shift := uint(0); ; shift += 7 {
  10590. if shift >= 64 {
  10591. return ErrIntOverflowTypes
  10592. }
  10593. if iNdEx >= l {
  10594. return io.ErrUnexpectedEOF
  10595. }
  10596. b := dAtA[iNdEx]
  10597. iNdEx++
  10598. stringLen |= uint64(b&0x7F) << shift
  10599. if b < 0x80 {
  10600. break
  10601. }
  10602. }
  10603. intStringLen := int(stringLen)
  10604. if intStringLen < 0 {
  10605. return ErrInvalidLengthTypes
  10606. }
  10607. postIndex := iNdEx + intStringLen
  10608. if postIndex < 0 {
  10609. return ErrInvalidLengthTypes
  10610. }
  10611. if postIndex > l {
  10612. return io.ErrUnexpectedEOF
  10613. }
  10614. m.Log = string(dAtA[iNdEx:postIndex])
  10615. iNdEx = postIndex
  10616. case 4:
  10617. if wireType != 2 {
  10618. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10619. }
  10620. var stringLen uint64
  10621. for shift := uint(0); ; shift += 7 {
  10622. if shift >= 64 {
  10623. return ErrIntOverflowTypes
  10624. }
  10625. if iNdEx >= l {
  10626. return io.ErrUnexpectedEOF
  10627. }
  10628. b := dAtA[iNdEx]
  10629. iNdEx++
  10630. stringLen |= uint64(b&0x7F) << shift
  10631. if b < 0x80 {
  10632. break
  10633. }
  10634. }
  10635. intStringLen := int(stringLen)
  10636. if intStringLen < 0 {
  10637. return ErrInvalidLengthTypes
  10638. }
  10639. postIndex := iNdEx + intStringLen
  10640. if postIndex < 0 {
  10641. return ErrInvalidLengthTypes
  10642. }
  10643. if postIndex > l {
  10644. return io.ErrUnexpectedEOF
  10645. }
  10646. m.Info = string(dAtA[iNdEx:postIndex])
  10647. iNdEx = postIndex
  10648. case 5:
  10649. if wireType != 0 {
  10650. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10651. }
  10652. m.GasWanted = 0
  10653. for shift := uint(0); ; shift += 7 {
  10654. if shift >= 64 {
  10655. return ErrIntOverflowTypes
  10656. }
  10657. if iNdEx >= l {
  10658. return io.ErrUnexpectedEOF
  10659. }
  10660. b := dAtA[iNdEx]
  10661. iNdEx++
  10662. m.GasWanted |= int64(b&0x7F) << shift
  10663. if b < 0x80 {
  10664. break
  10665. }
  10666. }
  10667. case 6:
  10668. if wireType != 0 {
  10669. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10670. }
  10671. m.GasUsed = 0
  10672. for shift := uint(0); ; shift += 7 {
  10673. if shift >= 64 {
  10674. return ErrIntOverflowTypes
  10675. }
  10676. if iNdEx >= l {
  10677. return io.ErrUnexpectedEOF
  10678. }
  10679. b := dAtA[iNdEx]
  10680. iNdEx++
  10681. m.GasUsed |= int64(b&0x7F) << shift
  10682. if b < 0x80 {
  10683. break
  10684. }
  10685. }
  10686. case 7:
  10687. if wireType != 2 {
  10688. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10689. }
  10690. var msglen int
  10691. for shift := uint(0); ; shift += 7 {
  10692. if shift >= 64 {
  10693. return ErrIntOverflowTypes
  10694. }
  10695. if iNdEx >= l {
  10696. return io.ErrUnexpectedEOF
  10697. }
  10698. b := dAtA[iNdEx]
  10699. iNdEx++
  10700. msglen |= int(b&0x7F) << shift
  10701. if b < 0x80 {
  10702. break
  10703. }
  10704. }
  10705. if msglen < 0 {
  10706. return ErrInvalidLengthTypes
  10707. }
  10708. postIndex := iNdEx + msglen
  10709. if postIndex < 0 {
  10710. return ErrInvalidLengthTypes
  10711. }
  10712. if postIndex > l {
  10713. return io.ErrUnexpectedEOF
  10714. }
  10715. m.Events = append(m.Events, Event{})
  10716. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10717. return err
  10718. }
  10719. iNdEx = postIndex
  10720. case 8:
  10721. if wireType != 2 {
  10722. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10723. }
  10724. var stringLen uint64
  10725. for shift := uint(0); ; shift += 7 {
  10726. if shift >= 64 {
  10727. return ErrIntOverflowTypes
  10728. }
  10729. if iNdEx >= l {
  10730. return io.ErrUnexpectedEOF
  10731. }
  10732. b := dAtA[iNdEx]
  10733. iNdEx++
  10734. stringLen |= uint64(b&0x7F) << shift
  10735. if b < 0x80 {
  10736. break
  10737. }
  10738. }
  10739. intStringLen := int(stringLen)
  10740. if intStringLen < 0 {
  10741. return ErrInvalidLengthTypes
  10742. }
  10743. postIndex := iNdEx + intStringLen
  10744. if postIndex < 0 {
  10745. return ErrInvalidLengthTypes
  10746. }
  10747. if postIndex > l {
  10748. return io.ErrUnexpectedEOF
  10749. }
  10750. m.Codespace = string(dAtA[iNdEx:postIndex])
  10751. iNdEx = postIndex
  10752. default:
  10753. iNdEx = preIndex
  10754. skippy, err := skipTypes(dAtA[iNdEx:])
  10755. if err != nil {
  10756. return err
  10757. }
  10758. if skippy < 0 {
  10759. return ErrInvalidLengthTypes
  10760. }
  10761. if (iNdEx + skippy) < 0 {
  10762. return ErrInvalidLengthTypes
  10763. }
  10764. if (iNdEx + skippy) > l {
  10765. return io.ErrUnexpectedEOF
  10766. }
  10767. iNdEx += skippy
  10768. }
  10769. }
  10770. if iNdEx > l {
  10771. return io.ErrUnexpectedEOF
  10772. }
  10773. return nil
  10774. }
  10775. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10776. l := len(dAtA)
  10777. iNdEx := 0
  10778. for iNdEx < l {
  10779. preIndex := iNdEx
  10780. var wire uint64
  10781. for shift := uint(0); ; shift += 7 {
  10782. if shift >= 64 {
  10783. return ErrIntOverflowTypes
  10784. }
  10785. if iNdEx >= l {
  10786. return io.ErrUnexpectedEOF
  10787. }
  10788. b := dAtA[iNdEx]
  10789. iNdEx++
  10790. wire |= uint64(b&0x7F) << shift
  10791. if b < 0x80 {
  10792. break
  10793. }
  10794. }
  10795. fieldNum := int32(wire >> 3)
  10796. wireType := int(wire & 0x7)
  10797. if wireType == 4 {
  10798. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10799. }
  10800. if fieldNum <= 0 {
  10801. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10802. }
  10803. switch fieldNum {
  10804. case 1:
  10805. if wireType != 0 {
  10806. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10807. }
  10808. m.Code = 0
  10809. for shift := uint(0); ; shift += 7 {
  10810. if shift >= 64 {
  10811. return ErrIntOverflowTypes
  10812. }
  10813. if iNdEx >= l {
  10814. return io.ErrUnexpectedEOF
  10815. }
  10816. b := dAtA[iNdEx]
  10817. iNdEx++
  10818. m.Code |= uint32(b&0x7F) << shift
  10819. if b < 0x80 {
  10820. break
  10821. }
  10822. }
  10823. case 2:
  10824. if wireType != 2 {
  10825. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10826. }
  10827. var byteLen int
  10828. for shift := uint(0); ; shift += 7 {
  10829. if shift >= 64 {
  10830. return ErrIntOverflowTypes
  10831. }
  10832. if iNdEx >= l {
  10833. return io.ErrUnexpectedEOF
  10834. }
  10835. b := dAtA[iNdEx]
  10836. iNdEx++
  10837. byteLen |= int(b&0x7F) << shift
  10838. if b < 0x80 {
  10839. break
  10840. }
  10841. }
  10842. if byteLen < 0 {
  10843. return ErrInvalidLengthTypes
  10844. }
  10845. postIndex := iNdEx + byteLen
  10846. if postIndex < 0 {
  10847. return ErrInvalidLengthTypes
  10848. }
  10849. if postIndex > l {
  10850. return io.ErrUnexpectedEOF
  10851. }
  10852. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10853. if m.Data == nil {
  10854. m.Data = []byte{}
  10855. }
  10856. iNdEx = postIndex
  10857. case 3:
  10858. if wireType != 2 {
  10859. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10860. }
  10861. var stringLen uint64
  10862. for shift := uint(0); ; shift += 7 {
  10863. if shift >= 64 {
  10864. return ErrIntOverflowTypes
  10865. }
  10866. if iNdEx >= l {
  10867. return io.ErrUnexpectedEOF
  10868. }
  10869. b := dAtA[iNdEx]
  10870. iNdEx++
  10871. stringLen |= uint64(b&0x7F) << shift
  10872. if b < 0x80 {
  10873. break
  10874. }
  10875. }
  10876. intStringLen := int(stringLen)
  10877. if intStringLen < 0 {
  10878. return ErrInvalidLengthTypes
  10879. }
  10880. postIndex := iNdEx + intStringLen
  10881. if postIndex < 0 {
  10882. return ErrInvalidLengthTypes
  10883. }
  10884. if postIndex > l {
  10885. return io.ErrUnexpectedEOF
  10886. }
  10887. m.Log = string(dAtA[iNdEx:postIndex])
  10888. iNdEx = postIndex
  10889. case 4:
  10890. if wireType != 2 {
  10891. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10892. }
  10893. var stringLen uint64
  10894. for shift := uint(0); ; shift += 7 {
  10895. if shift >= 64 {
  10896. return ErrIntOverflowTypes
  10897. }
  10898. if iNdEx >= l {
  10899. return io.ErrUnexpectedEOF
  10900. }
  10901. b := dAtA[iNdEx]
  10902. iNdEx++
  10903. stringLen |= uint64(b&0x7F) << shift
  10904. if b < 0x80 {
  10905. break
  10906. }
  10907. }
  10908. intStringLen := int(stringLen)
  10909. if intStringLen < 0 {
  10910. return ErrInvalidLengthTypes
  10911. }
  10912. postIndex := iNdEx + intStringLen
  10913. if postIndex < 0 {
  10914. return ErrInvalidLengthTypes
  10915. }
  10916. if postIndex > l {
  10917. return io.ErrUnexpectedEOF
  10918. }
  10919. m.Info = string(dAtA[iNdEx:postIndex])
  10920. iNdEx = postIndex
  10921. case 5:
  10922. if wireType != 0 {
  10923. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10924. }
  10925. m.GasWanted = 0
  10926. for shift := uint(0); ; shift += 7 {
  10927. if shift >= 64 {
  10928. return ErrIntOverflowTypes
  10929. }
  10930. if iNdEx >= l {
  10931. return io.ErrUnexpectedEOF
  10932. }
  10933. b := dAtA[iNdEx]
  10934. iNdEx++
  10935. m.GasWanted |= int64(b&0x7F) << shift
  10936. if b < 0x80 {
  10937. break
  10938. }
  10939. }
  10940. case 6:
  10941. if wireType != 0 {
  10942. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10943. }
  10944. m.GasUsed = 0
  10945. for shift := uint(0); ; shift += 7 {
  10946. if shift >= 64 {
  10947. return ErrIntOverflowTypes
  10948. }
  10949. if iNdEx >= l {
  10950. return io.ErrUnexpectedEOF
  10951. }
  10952. b := dAtA[iNdEx]
  10953. iNdEx++
  10954. m.GasUsed |= int64(b&0x7F) << shift
  10955. if b < 0x80 {
  10956. break
  10957. }
  10958. }
  10959. case 7:
  10960. if wireType != 2 {
  10961. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10962. }
  10963. var msglen int
  10964. for shift := uint(0); ; shift += 7 {
  10965. if shift >= 64 {
  10966. return ErrIntOverflowTypes
  10967. }
  10968. if iNdEx >= l {
  10969. return io.ErrUnexpectedEOF
  10970. }
  10971. b := dAtA[iNdEx]
  10972. iNdEx++
  10973. msglen |= int(b&0x7F) << shift
  10974. if b < 0x80 {
  10975. break
  10976. }
  10977. }
  10978. if msglen < 0 {
  10979. return ErrInvalidLengthTypes
  10980. }
  10981. postIndex := iNdEx + msglen
  10982. if postIndex < 0 {
  10983. return ErrInvalidLengthTypes
  10984. }
  10985. if postIndex > l {
  10986. return io.ErrUnexpectedEOF
  10987. }
  10988. m.Events = append(m.Events, Event{})
  10989. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10990. return err
  10991. }
  10992. iNdEx = postIndex
  10993. case 8:
  10994. if wireType != 2 {
  10995. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10996. }
  10997. var stringLen uint64
  10998. for shift := uint(0); ; shift += 7 {
  10999. if shift >= 64 {
  11000. return ErrIntOverflowTypes
  11001. }
  11002. if iNdEx >= l {
  11003. return io.ErrUnexpectedEOF
  11004. }
  11005. b := dAtA[iNdEx]
  11006. iNdEx++
  11007. stringLen |= uint64(b&0x7F) << shift
  11008. if b < 0x80 {
  11009. break
  11010. }
  11011. }
  11012. intStringLen := int(stringLen)
  11013. if intStringLen < 0 {
  11014. return ErrInvalidLengthTypes
  11015. }
  11016. postIndex := iNdEx + intStringLen
  11017. if postIndex < 0 {
  11018. return ErrInvalidLengthTypes
  11019. }
  11020. if postIndex > l {
  11021. return io.ErrUnexpectedEOF
  11022. }
  11023. m.Codespace = string(dAtA[iNdEx:postIndex])
  11024. iNdEx = postIndex
  11025. default:
  11026. iNdEx = preIndex
  11027. skippy, err := skipTypes(dAtA[iNdEx:])
  11028. if err != nil {
  11029. return err
  11030. }
  11031. if skippy < 0 {
  11032. return ErrInvalidLengthTypes
  11033. }
  11034. if (iNdEx + skippy) < 0 {
  11035. return ErrInvalidLengthTypes
  11036. }
  11037. if (iNdEx + skippy) > l {
  11038. return io.ErrUnexpectedEOF
  11039. }
  11040. iNdEx += skippy
  11041. }
  11042. }
  11043. if iNdEx > l {
  11044. return io.ErrUnexpectedEOF
  11045. }
  11046. return nil
  11047. }
  11048. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  11049. l := len(dAtA)
  11050. iNdEx := 0
  11051. for iNdEx < l {
  11052. preIndex := iNdEx
  11053. var wire uint64
  11054. for shift := uint(0); ; shift += 7 {
  11055. if shift >= 64 {
  11056. return ErrIntOverflowTypes
  11057. }
  11058. if iNdEx >= l {
  11059. return io.ErrUnexpectedEOF
  11060. }
  11061. b := dAtA[iNdEx]
  11062. iNdEx++
  11063. wire |= uint64(b&0x7F) << shift
  11064. if b < 0x80 {
  11065. break
  11066. }
  11067. }
  11068. fieldNum := int32(wire >> 3)
  11069. wireType := int(wire & 0x7)
  11070. if wireType == 4 {
  11071. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  11072. }
  11073. if fieldNum <= 0 {
  11074. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11075. }
  11076. switch fieldNum {
  11077. case 1:
  11078. if wireType != 2 {
  11079. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  11080. }
  11081. var msglen int
  11082. for shift := uint(0); ; shift += 7 {
  11083. if shift >= 64 {
  11084. return ErrIntOverflowTypes
  11085. }
  11086. if iNdEx >= l {
  11087. return io.ErrUnexpectedEOF
  11088. }
  11089. b := dAtA[iNdEx]
  11090. iNdEx++
  11091. msglen |= int(b&0x7F) << shift
  11092. if b < 0x80 {
  11093. break
  11094. }
  11095. }
  11096. if msglen < 0 {
  11097. return ErrInvalidLengthTypes
  11098. }
  11099. postIndex := iNdEx + msglen
  11100. if postIndex < 0 {
  11101. return ErrInvalidLengthTypes
  11102. }
  11103. if postIndex > l {
  11104. return io.ErrUnexpectedEOF
  11105. }
  11106. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  11107. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11108. return err
  11109. }
  11110. iNdEx = postIndex
  11111. case 2:
  11112. if wireType != 2 {
  11113. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  11114. }
  11115. var msglen int
  11116. for shift := uint(0); ; shift += 7 {
  11117. if shift >= 64 {
  11118. return ErrIntOverflowTypes
  11119. }
  11120. if iNdEx >= l {
  11121. return io.ErrUnexpectedEOF
  11122. }
  11123. b := dAtA[iNdEx]
  11124. iNdEx++
  11125. msglen |= int(b&0x7F) << shift
  11126. if b < 0x80 {
  11127. break
  11128. }
  11129. }
  11130. if msglen < 0 {
  11131. return ErrInvalidLengthTypes
  11132. }
  11133. postIndex := iNdEx + msglen
  11134. if postIndex < 0 {
  11135. return ErrInvalidLengthTypes
  11136. }
  11137. if postIndex > l {
  11138. return io.ErrUnexpectedEOF
  11139. }
  11140. if m.ConsensusParamUpdates == nil {
  11141. m.ConsensusParamUpdates = &ConsensusParams{}
  11142. }
  11143. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11144. return err
  11145. }
  11146. iNdEx = postIndex
  11147. case 3:
  11148. if wireType != 2 {
  11149. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11150. }
  11151. var msglen int
  11152. for shift := uint(0); ; shift += 7 {
  11153. if shift >= 64 {
  11154. return ErrIntOverflowTypes
  11155. }
  11156. if iNdEx >= l {
  11157. return io.ErrUnexpectedEOF
  11158. }
  11159. b := dAtA[iNdEx]
  11160. iNdEx++
  11161. msglen |= int(b&0x7F) << shift
  11162. if b < 0x80 {
  11163. break
  11164. }
  11165. }
  11166. if msglen < 0 {
  11167. return ErrInvalidLengthTypes
  11168. }
  11169. postIndex := iNdEx + msglen
  11170. if postIndex < 0 {
  11171. return ErrInvalidLengthTypes
  11172. }
  11173. if postIndex > l {
  11174. return io.ErrUnexpectedEOF
  11175. }
  11176. m.Events = append(m.Events, Event{})
  11177. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11178. return err
  11179. }
  11180. iNdEx = postIndex
  11181. default:
  11182. iNdEx = preIndex
  11183. skippy, err := skipTypes(dAtA[iNdEx:])
  11184. if err != nil {
  11185. return err
  11186. }
  11187. if skippy < 0 {
  11188. return ErrInvalidLengthTypes
  11189. }
  11190. if (iNdEx + skippy) < 0 {
  11191. return ErrInvalidLengthTypes
  11192. }
  11193. if (iNdEx + skippy) > l {
  11194. return io.ErrUnexpectedEOF
  11195. }
  11196. iNdEx += skippy
  11197. }
  11198. }
  11199. if iNdEx > l {
  11200. return io.ErrUnexpectedEOF
  11201. }
  11202. return nil
  11203. }
  11204. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11205. l := len(dAtA)
  11206. iNdEx := 0
  11207. for iNdEx < l {
  11208. preIndex := iNdEx
  11209. var wire uint64
  11210. for shift := uint(0); ; shift += 7 {
  11211. if shift >= 64 {
  11212. return ErrIntOverflowTypes
  11213. }
  11214. if iNdEx >= l {
  11215. return io.ErrUnexpectedEOF
  11216. }
  11217. b := dAtA[iNdEx]
  11218. iNdEx++
  11219. wire |= uint64(b&0x7F) << shift
  11220. if b < 0x80 {
  11221. break
  11222. }
  11223. }
  11224. fieldNum := int32(wire >> 3)
  11225. wireType := int(wire & 0x7)
  11226. if wireType == 4 {
  11227. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11228. }
  11229. if fieldNum <= 0 {
  11230. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11231. }
  11232. switch fieldNum {
  11233. case 2:
  11234. if wireType != 2 {
  11235. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11236. }
  11237. var byteLen int
  11238. for shift := uint(0); ; shift += 7 {
  11239. if shift >= 64 {
  11240. return ErrIntOverflowTypes
  11241. }
  11242. if iNdEx >= l {
  11243. return io.ErrUnexpectedEOF
  11244. }
  11245. b := dAtA[iNdEx]
  11246. iNdEx++
  11247. byteLen |= int(b&0x7F) << shift
  11248. if b < 0x80 {
  11249. break
  11250. }
  11251. }
  11252. if byteLen < 0 {
  11253. return ErrInvalidLengthTypes
  11254. }
  11255. postIndex := iNdEx + byteLen
  11256. if postIndex < 0 {
  11257. return ErrInvalidLengthTypes
  11258. }
  11259. if postIndex > l {
  11260. return io.ErrUnexpectedEOF
  11261. }
  11262. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11263. if m.Data == nil {
  11264. m.Data = []byte{}
  11265. }
  11266. iNdEx = postIndex
  11267. case 3:
  11268. if wireType != 0 {
  11269. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11270. }
  11271. m.RetainHeight = 0
  11272. for shift := uint(0); ; shift += 7 {
  11273. if shift >= 64 {
  11274. return ErrIntOverflowTypes
  11275. }
  11276. if iNdEx >= l {
  11277. return io.ErrUnexpectedEOF
  11278. }
  11279. b := dAtA[iNdEx]
  11280. iNdEx++
  11281. m.RetainHeight |= int64(b&0x7F) << shift
  11282. if b < 0x80 {
  11283. break
  11284. }
  11285. }
  11286. default:
  11287. iNdEx = preIndex
  11288. skippy, err := skipTypes(dAtA[iNdEx:])
  11289. if err != nil {
  11290. return err
  11291. }
  11292. if skippy < 0 {
  11293. return ErrInvalidLengthTypes
  11294. }
  11295. if (iNdEx + skippy) < 0 {
  11296. return ErrInvalidLengthTypes
  11297. }
  11298. if (iNdEx + skippy) > l {
  11299. return io.ErrUnexpectedEOF
  11300. }
  11301. iNdEx += skippy
  11302. }
  11303. }
  11304. if iNdEx > l {
  11305. return io.ErrUnexpectedEOF
  11306. }
  11307. return nil
  11308. }
  11309. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11310. l := len(dAtA)
  11311. iNdEx := 0
  11312. for iNdEx < l {
  11313. preIndex := iNdEx
  11314. var wire uint64
  11315. for shift := uint(0); ; shift += 7 {
  11316. if shift >= 64 {
  11317. return ErrIntOverflowTypes
  11318. }
  11319. if iNdEx >= l {
  11320. return io.ErrUnexpectedEOF
  11321. }
  11322. b := dAtA[iNdEx]
  11323. iNdEx++
  11324. wire |= uint64(b&0x7F) << shift
  11325. if b < 0x80 {
  11326. break
  11327. }
  11328. }
  11329. fieldNum := int32(wire >> 3)
  11330. wireType := int(wire & 0x7)
  11331. if wireType == 4 {
  11332. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11333. }
  11334. if fieldNum <= 0 {
  11335. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11336. }
  11337. switch fieldNum {
  11338. case 1:
  11339. if wireType != 2 {
  11340. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11341. }
  11342. var msglen int
  11343. for shift := uint(0); ; shift += 7 {
  11344. if shift >= 64 {
  11345. return ErrIntOverflowTypes
  11346. }
  11347. if iNdEx >= l {
  11348. return io.ErrUnexpectedEOF
  11349. }
  11350. b := dAtA[iNdEx]
  11351. iNdEx++
  11352. msglen |= int(b&0x7F) << shift
  11353. if b < 0x80 {
  11354. break
  11355. }
  11356. }
  11357. if msglen < 0 {
  11358. return ErrInvalidLengthTypes
  11359. }
  11360. postIndex := iNdEx + msglen
  11361. if postIndex < 0 {
  11362. return ErrInvalidLengthTypes
  11363. }
  11364. if postIndex > l {
  11365. return io.ErrUnexpectedEOF
  11366. }
  11367. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11368. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11369. return err
  11370. }
  11371. iNdEx = postIndex
  11372. default:
  11373. iNdEx = preIndex
  11374. skippy, err := skipTypes(dAtA[iNdEx:])
  11375. if err != nil {
  11376. return err
  11377. }
  11378. if skippy < 0 {
  11379. return ErrInvalidLengthTypes
  11380. }
  11381. if (iNdEx + skippy) < 0 {
  11382. return ErrInvalidLengthTypes
  11383. }
  11384. if (iNdEx + skippy) > l {
  11385. return io.ErrUnexpectedEOF
  11386. }
  11387. iNdEx += skippy
  11388. }
  11389. }
  11390. if iNdEx > l {
  11391. return io.ErrUnexpectedEOF
  11392. }
  11393. return nil
  11394. }
  11395. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11396. l := len(dAtA)
  11397. iNdEx := 0
  11398. for iNdEx < l {
  11399. preIndex := iNdEx
  11400. var wire uint64
  11401. for shift := uint(0); ; shift += 7 {
  11402. if shift >= 64 {
  11403. return ErrIntOverflowTypes
  11404. }
  11405. if iNdEx >= l {
  11406. return io.ErrUnexpectedEOF
  11407. }
  11408. b := dAtA[iNdEx]
  11409. iNdEx++
  11410. wire |= uint64(b&0x7F) << shift
  11411. if b < 0x80 {
  11412. break
  11413. }
  11414. }
  11415. fieldNum := int32(wire >> 3)
  11416. wireType := int(wire & 0x7)
  11417. if wireType == 4 {
  11418. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11419. }
  11420. if fieldNum <= 0 {
  11421. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11422. }
  11423. switch fieldNum {
  11424. case 1:
  11425. if wireType != 0 {
  11426. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11427. }
  11428. m.Result = 0
  11429. for shift := uint(0); ; shift += 7 {
  11430. if shift >= 64 {
  11431. return ErrIntOverflowTypes
  11432. }
  11433. if iNdEx >= l {
  11434. return io.ErrUnexpectedEOF
  11435. }
  11436. b := dAtA[iNdEx]
  11437. iNdEx++
  11438. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11439. if b < 0x80 {
  11440. break
  11441. }
  11442. }
  11443. default:
  11444. iNdEx = preIndex
  11445. skippy, err := skipTypes(dAtA[iNdEx:])
  11446. if err != nil {
  11447. return err
  11448. }
  11449. if skippy < 0 {
  11450. return ErrInvalidLengthTypes
  11451. }
  11452. if (iNdEx + skippy) < 0 {
  11453. return ErrInvalidLengthTypes
  11454. }
  11455. if (iNdEx + skippy) > l {
  11456. return io.ErrUnexpectedEOF
  11457. }
  11458. iNdEx += skippy
  11459. }
  11460. }
  11461. if iNdEx > l {
  11462. return io.ErrUnexpectedEOF
  11463. }
  11464. return nil
  11465. }
  11466. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11467. l := len(dAtA)
  11468. iNdEx := 0
  11469. for iNdEx < l {
  11470. preIndex := iNdEx
  11471. var wire uint64
  11472. for shift := uint(0); ; shift += 7 {
  11473. if shift >= 64 {
  11474. return ErrIntOverflowTypes
  11475. }
  11476. if iNdEx >= l {
  11477. return io.ErrUnexpectedEOF
  11478. }
  11479. b := dAtA[iNdEx]
  11480. iNdEx++
  11481. wire |= uint64(b&0x7F) << shift
  11482. if b < 0x80 {
  11483. break
  11484. }
  11485. }
  11486. fieldNum := int32(wire >> 3)
  11487. wireType := int(wire & 0x7)
  11488. if wireType == 4 {
  11489. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11490. }
  11491. if fieldNum <= 0 {
  11492. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11493. }
  11494. switch fieldNum {
  11495. case 1:
  11496. if wireType != 2 {
  11497. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11498. }
  11499. var byteLen int
  11500. for shift := uint(0); ; shift += 7 {
  11501. if shift >= 64 {
  11502. return ErrIntOverflowTypes
  11503. }
  11504. if iNdEx >= l {
  11505. return io.ErrUnexpectedEOF
  11506. }
  11507. b := dAtA[iNdEx]
  11508. iNdEx++
  11509. byteLen |= int(b&0x7F) << shift
  11510. if b < 0x80 {
  11511. break
  11512. }
  11513. }
  11514. if byteLen < 0 {
  11515. return ErrInvalidLengthTypes
  11516. }
  11517. postIndex := iNdEx + byteLen
  11518. if postIndex < 0 {
  11519. return ErrInvalidLengthTypes
  11520. }
  11521. if postIndex > l {
  11522. return io.ErrUnexpectedEOF
  11523. }
  11524. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11525. if m.Chunk == nil {
  11526. m.Chunk = []byte{}
  11527. }
  11528. iNdEx = postIndex
  11529. default:
  11530. iNdEx = preIndex
  11531. skippy, err := skipTypes(dAtA[iNdEx:])
  11532. if err != nil {
  11533. return err
  11534. }
  11535. if skippy < 0 {
  11536. return ErrInvalidLengthTypes
  11537. }
  11538. if (iNdEx + skippy) < 0 {
  11539. return ErrInvalidLengthTypes
  11540. }
  11541. if (iNdEx + skippy) > l {
  11542. return io.ErrUnexpectedEOF
  11543. }
  11544. iNdEx += skippy
  11545. }
  11546. }
  11547. if iNdEx > l {
  11548. return io.ErrUnexpectedEOF
  11549. }
  11550. return nil
  11551. }
  11552. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11553. l := len(dAtA)
  11554. iNdEx := 0
  11555. for iNdEx < l {
  11556. preIndex := iNdEx
  11557. var wire uint64
  11558. for shift := uint(0); ; shift += 7 {
  11559. if shift >= 64 {
  11560. return ErrIntOverflowTypes
  11561. }
  11562. if iNdEx >= l {
  11563. return io.ErrUnexpectedEOF
  11564. }
  11565. b := dAtA[iNdEx]
  11566. iNdEx++
  11567. wire |= uint64(b&0x7F) << shift
  11568. if b < 0x80 {
  11569. break
  11570. }
  11571. }
  11572. fieldNum := int32(wire >> 3)
  11573. wireType := int(wire & 0x7)
  11574. if wireType == 4 {
  11575. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11576. }
  11577. if fieldNum <= 0 {
  11578. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11579. }
  11580. switch fieldNum {
  11581. case 1:
  11582. if wireType != 0 {
  11583. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11584. }
  11585. m.Result = 0
  11586. for shift := uint(0); ; shift += 7 {
  11587. if shift >= 64 {
  11588. return ErrIntOverflowTypes
  11589. }
  11590. if iNdEx >= l {
  11591. return io.ErrUnexpectedEOF
  11592. }
  11593. b := dAtA[iNdEx]
  11594. iNdEx++
  11595. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11596. if b < 0x80 {
  11597. break
  11598. }
  11599. }
  11600. case 2:
  11601. if wireType == 0 {
  11602. var v uint32
  11603. for shift := uint(0); ; shift += 7 {
  11604. if shift >= 64 {
  11605. return ErrIntOverflowTypes
  11606. }
  11607. if iNdEx >= l {
  11608. return io.ErrUnexpectedEOF
  11609. }
  11610. b := dAtA[iNdEx]
  11611. iNdEx++
  11612. v |= uint32(b&0x7F) << shift
  11613. if b < 0x80 {
  11614. break
  11615. }
  11616. }
  11617. m.RefetchChunks = append(m.RefetchChunks, v)
  11618. } else if wireType == 2 {
  11619. var packedLen int
  11620. for shift := uint(0); ; shift += 7 {
  11621. if shift >= 64 {
  11622. return ErrIntOverflowTypes
  11623. }
  11624. if iNdEx >= l {
  11625. return io.ErrUnexpectedEOF
  11626. }
  11627. b := dAtA[iNdEx]
  11628. iNdEx++
  11629. packedLen |= int(b&0x7F) << shift
  11630. if b < 0x80 {
  11631. break
  11632. }
  11633. }
  11634. if packedLen < 0 {
  11635. return ErrInvalidLengthTypes
  11636. }
  11637. postIndex := iNdEx + packedLen
  11638. if postIndex < 0 {
  11639. return ErrInvalidLengthTypes
  11640. }
  11641. if postIndex > l {
  11642. return io.ErrUnexpectedEOF
  11643. }
  11644. var elementCount int
  11645. var count int
  11646. for _, integer := range dAtA[iNdEx:postIndex] {
  11647. if integer < 128 {
  11648. count++
  11649. }
  11650. }
  11651. elementCount = count
  11652. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11653. m.RefetchChunks = make([]uint32, 0, elementCount)
  11654. }
  11655. for iNdEx < postIndex {
  11656. var v uint32
  11657. for shift := uint(0); ; shift += 7 {
  11658. if shift >= 64 {
  11659. return ErrIntOverflowTypes
  11660. }
  11661. if iNdEx >= l {
  11662. return io.ErrUnexpectedEOF
  11663. }
  11664. b := dAtA[iNdEx]
  11665. iNdEx++
  11666. v |= uint32(b&0x7F) << shift
  11667. if b < 0x80 {
  11668. break
  11669. }
  11670. }
  11671. m.RefetchChunks = append(m.RefetchChunks, v)
  11672. }
  11673. } else {
  11674. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11675. }
  11676. case 3:
  11677. if wireType != 2 {
  11678. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11679. }
  11680. var stringLen uint64
  11681. for shift := uint(0); ; shift += 7 {
  11682. if shift >= 64 {
  11683. return ErrIntOverflowTypes
  11684. }
  11685. if iNdEx >= l {
  11686. return io.ErrUnexpectedEOF
  11687. }
  11688. b := dAtA[iNdEx]
  11689. iNdEx++
  11690. stringLen |= uint64(b&0x7F) << shift
  11691. if b < 0x80 {
  11692. break
  11693. }
  11694. }
  11695. intStringLen := int(stringLen)
  11696. if intStringLen < 0 {
  11697. return ErrInvalidLengthTypes
  11698. }
  11699. postIndex := iNdEx + intStringLen
  11700. if postIndex < 0 {
  11701. return ErrInvalidLengthTypes
  11702. }
  11703. if postIndex > l {
  11704. return io.ErrUnexpectedEOF
  11705. }
  11706. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11707. iNdEx = postIndex
  11708. default:
  11709. iNdEx = preIndex
  11710. skippy, err := skipTypes(dAtA[iNdEx:])
  11711. if err != nil {
  11712. return err
  11713. }
  11714. if skippy < 0 {
  11715. return ErrInvalidLengthTypes
  11716. }
  11717. if (iNdEx + skippy) < 0 {
  11718. return ErrInvalidLengthTypes
  11719. }
  11720. if (iNdEx + skippy) > l {
  11721. return io.ErrUnexpectedEOF
  11722. }
  11723. iNdEx += skippy
  11724. }
  11725. }
  11726. if iNdEx > l {
  11727. return io.ErrUnexpectedEOF
  11728. }
  11729. return nil
  11730. }
  11731. func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
  11732. l := len(dAtA)
  11733. iNdEx := 0
  11734. for iNdEx < l {
  11735. preIndex := iNdEx
  11736. var wire uint64
  11737. for shift := uint(0); ; shift += 7 {
  11738. if shift >= 64 {
  11739. return ErrIntOverflowTypes
  11740. }
  11741. if iNdEx >= l {
  11742. return io.ErrUnexpectedEOF
  11743. }
  11744. b := dAtA[iNdEx]
  11745. iNdEx++
  11746. wire |= uint64(b&0x7F) << shift
  11747. if b < 0x80 {
  11748. break
  11749. }
  11750. }
  11751. fieldNum := int32(wire >> 3)
  11752. wireType := int(wire & 0x7)
  11753. if wireType == 4 {
  11754. return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group")
  11755. }
  11756. if fieldNum <= 0 {
  11757. return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
  11758. }
  11759. switch fieldNum {
  11760. case 1:
  11761. if wireType != 2 {
  11762. return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  11763. }
  11764. var msglen int
  11765. for shift := uint(0); ; shift += 7 {
  11766. if shift >= 64 {
  11767. return ErrIntOverflowTypes
  11768. }
  11769. if iNdEx >= l {
  11770. return io.ErrUnexpectedEOF
  11771. }
  11772. b := dAtA[iNdEx]
  11773. iNdEx++
  11774. msglen |= int(b&0x7F) << shift
  11775. if b < 0x80 {
  11776. break
  11777. }
  11778. }
  11779. if msglen < 0 {
  11780. return ErrInvalidLengthTypes
  11781. }
  11782. postIndex := iNdEx + msglen
  11783. if postIndex < 0 {
  11784. return ErrInvalidLengthTypes
  11785. }
  11786. if postIndex > l {
  11787. return io.ErrUnexpectedEOF
  11788. }
  11789. if m.Block == nil {
  11790. m.Block = &BlockParams{}
  11791. }
  11792. if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11793. return err
  11794. }
  11795. iNdEx = postIndex
  11796. case 2:
  11797. if wireType != 2 {
  11798. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  11799. }
  11800. var msglen int
  11801. for shift := uint(0); ; shift += 7 {
  11802. if shift >= 64 {
  11803. return ErrIntOverflowTypes
  11804. }
  11805. if iNdEx >= l {
  11806. return io.ErrUnexpectedEOF
  11807. }
  11808. b := dAtA[iNdEx]
  11809. iNdEx++
  11810. msglen |= int(b&0x7F) << shift
  11811. if b < 0x80 {
  11812. break
  11813. }
  11814. }
  11815. if msglen < 0 {
  11816. return ErrInvalidLengthTypes
  11817. }
  11818. postIndex := iNdEx + msglen
  11819. if postIndex < 0 {
  11820. return ErrInvalidLengthTypes
  11821. }
  11822. if postIndex > l {
  11823. return io.ErrUnexpectedEOF
  11824. }
  11825. if m.Evidence == nil {
  11826. m.Evidence = &types1.EvidenceParams{}
  11827. }
  11828. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11829. return err
  11830. }
  11831. iNdEx = postIndex
  11832. case 3:
  11833. if wireType != 2 {
  11834. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  11835. }
  11836. var msglen int
  11837. for shift := uint(0); ; shift += 7 {
  11838. if shift >= 64 {
  11839. return ErrIntOverflowTypes
  11840. }
  11841. if iNdEx >= l {
  11842. return io.ErrUnexpectedEOF
  11843. }
  11844. b := dAtA[iNdEx]
  11845. iNdEx++
  11846. msglen |= int(b&0x7F) << shift
  11847. if b < 0x80 {
  11848. break
  11849. }
  11850. }
  11851. if msglen < 0 {
  11852. return ErrInvalidLengthTypes
  11853. }
  11854. postIndex := iNdEx + msglen
  11855. if postIndex < 0 {
  11856. return ErrInvalidLengthTypes
  11857. }
  11858. if postIndex > l {
  11859. return io.ErrUnexpectedEOF
  11860. }
  11861. if m.Validator == nil {
  11862. m.Validator = &types1.ValidatorParams{}
  11863. }
  11864. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11865. return err
  11866. }
  11867. iNdEx = postIndex
  11868. case 4:
  11869. if wireType != 2 {
  11870. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  11871. }
  11872. var msglen int
  11873. for shift := uint(0); ; shift += 7 {
  11874. if shift >= 64 {
  11875. return ErrIntOverflowTypes
  11876. }
  11877. if iNdEx >= l {
  11878. return io.ErrUnexpectedEOF
  11879. }
  11880. b := dAtA[iNdEx]
  11881. iNdEx++
  11882. msglen |= int(b&0x7F) << shift
  11883. if b < 0x80 {
  11884. break
  11885. }
  11886. }
  11887. if msglen < 0 {
  11888. return ErrInvalidLengthTypes
  11889. }
  11890. postIndex := iNdEx + msglen
  11891. if postIndex < 0 {
  11892. return ErrInvalidLengthTypes
  11893. }
  11894. if postIndex > l {
  11895. return io.ErrUnexpectedEOF
  11896. }
  11897. if m.Version == nil {
  11898. m.Version = &types1.VersionParams{}
  11899. }
  11900. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11901. return err
  11902. }
  11903. iNdEx = postIndex
  11904. default:
  11905. iNdEx = preIndex
  11906. skippy, err := skipTypes(dAtA[iNdEx:])
  11907. if err != nil {
  11908. return err
  11909. }
  11910. if skippy < 0 {
  11911. return ErrInvalidLengthTypes
  11912. }
  11913. if (iNdEx + skippy) < 0 {
  11914. return ErrInvalidLengthTypes
  11915. }
  11916. if (iNdEx + skippy) > l {
  11917. return io.ErrUnexpectedEOF
  11918. }
  11919. iNdEx += skippy
  11920. }
  11921. }
  11922. if iNdEx > l {
  11923. return io.ErrUnexpectedEOF
  11924. }
  11925. return nil
  11926. }
  11927. func (m *BlockParams) Unmarshal(dAtA []byte) error {
  11928. l := len(dAtA)
  11929. iNdEx := 0
  11930. for iNdEx < l {
  11931. preIndex := iNdEx
  11932. var wire uint64
  11933. for shift := uint(0); ; shift += 7 {
  11934. if shift >= 64 {
  11935. return ErrIntOverflowTypes
  11936. }
  11937. if iNdEx >= l {
  11938. return io.ErrUnexpectedEOF
  11939. }
  11940. b := dAtA[iNdEx]
  11941. iNdEx++
  11942. wire |= uint64(b&0x7F) << shift
  11943. if b < 0x80 {
  11944. break
  11945. }
  11946. }
  11947. fieldNum := int32(wire >> 3)
  11948. wireType := int(wire & 0x7)
  11949. if wireType == 4 {
  11950. return fmt.Errorf("proto: BlockParams: wiretype end group for non-group")
  11951. }
  11952. if fieldNum <= 0 {
  11953. return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
  11954. }
  11955. switch fieldNum {
  11956. case 1:
  11957. if wireType != 0 {
  11958. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  11959. }
  11960. m.MaxBytes = 0
  11961. for shift := uint(0); ; shift += 7 {
  11962. if shift >= 64 {
  11963. return ErrIntOverflowTypes
  11964. }
  11965. if iNdEx >= l {
  11966. return io.ErrUnexpectedEOF
  11967. }
  11968. b := dAtA[iNdEx]
  11969. iNdEx++
  11970. m.MaxBytes |= int64(b&0x7F) << shift
  11971. if b < 0x80 {
  11972. break
  11973. }
  11974. }
  11975. case 2:
  11976. if wireType != 0 {
  11977. return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
  11978. }
  11979. m.MaxGas = 0
  11980. for shift := uint(0); ; shift += 7 {
  11981. if shift >= 64 {
  11982. return ErrIntOverflowTypes
  11983. }
  11984. if iNdEx >= l {
  11985. return io.ErrUnexpectedEOF
  11986. }
  11987. b := dAtA[iNdEx]
  11988. iNdEx++
  11989. m.MaxGas |= int64(b&0x7F) << shift
  11990. if b < 0x80 {
  11991. break
  11992. }
  11993. }
  11994. default:
  11995. iNdEx = preIndex
  11996. skippy, err := skipTypes(dAtA[iNdEx:])
  11997. if err != nil {
  11998. return err
  11999. }
  12000. if skippy < 0 {
  12001. return ErrInvalidLengthTypes
  12002. }
  12003. if (iNdEx + skippy) < 0 {
  12004. return ErrInvalidLengthTypes
  12005. }
  12006. if (iNdEx + skippy) > l {
  12007. return io.ErrUnexpectedEOF
  12008. }
  12009. iNdEx += skippy
  12010. }
  12011. }
  12012. if iNdEx > l {
  12013. return io.ErrUnexpectedEOF
  12014. }
  12015. return nil
  12016. }
  12017. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  12018. l := len(dAtA)
  12019. iNdEx := 0
  12020. for iNdEx < l {
  12021. preIndex := iNdEx
  12022. var wire uint64
  12023. for shift := uint(0); ; shift += 7 {
  12024. if shift >= 64 {
  12025. return ErrIntOverflowTypes
  12026. }
  12027. if iNdEx >= l {
  12028. return io.ErrUnexpectedEOF
  12029. }
  12030. b := dAtA[iNdEx]
  12031. iNdEx++
  12032. wire |= uint64(b&0x7F) << shift
  12033. if b < 0x80 {
  12034. break
  12035. }
  12036. }
  12037. fieldNum := int32(wire >> 3)
  12038. wireType := int(wire & 0x7)
  12039. if wireType == 4 {
  12040. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  12041. }
  12042. if fieldNum <= 0 {
  12043. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12044. }
  12045. switch fieldNum {
  12046. case 1:
  12047. if wireType != 0 {
  12048. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  12049. }
  12050. m.Round = 0
  12051. for shift := uint(0); ; shift += 7 {
  12052. if shift >= 64 {
  12053. return ErrIntOverflowTypes
  12054. }
  12055. if iNdEx >= l {
  12056. return io.ErrUnexpectedEOF
  12057. }
  12058. b := dAtA[iNdEx]
  12059. iNdEx++
  12060. m.Round |= int32(b&0x7F) << shift
  12061. if b < 0x80 {
  12062. break
  12063. }
  12064. }
  12065. case 2:
  12066. if wireType != 2 {
  12067. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  12068. }
  12069. var msglen int
  12070. for shift := uint(0); ; shift += 7 {
  12071. if shift >= 64 {
  12072. return ErrIntOverflowTypes
  12073. }
  12074. if iNdEx >= l {
  12075. return io.ErrUnexpectedEOF
  12076. }
  12077. b := dAtA[iNdEx]
  12078. iNdEx++
  12079. msglen |= int(b&0x7F) << shift
  12080. if b < 0x80 {
  12081. break
  12082. }
  12083. }
  12084. if msglen < 0 {
  12085. return ErrInvalidLengthTypes
  12086. }
  12087. postIndex := iNdEx + msglen
  12088. if postIndex < 0 {
  12089. return ErrInvalidLengthTypes
  12090. }
  12091. if postIndex > l {
  12092. return io.ErrUnexpectedEOF
  12093. }
  12094. m.Votes = append(m.Votes, VoteInfo{})
  12095. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12096. return err
  12097. }
  12098. iNdEx = postIndex
  12099. default:
  12100. iNdEx = preIndex
  12101. skippy, err := skipTypes(dAtA[iNdEx:])
  12102. if err != nil {
  12103. return err
  12104. }
  12105. if skippy < 0 {
  12106. return ErrInvalidLengthTypes
  12107. }
  12108. if (iNdEx + skippy) < 0 {
  12109. return ErrInvalidLengthTypes
  12110. }
  12111. if (iNdEx + skippy) > l {
  12112. return io.ErrUnexpectedEOF
  12113. }
  12114. iNdEx += skippy
  12115. }
  12116. }
  12117. if iNdEx > l {
  12118. return io.ErrUnexpectedEOF
  12119. }
  12120. return nil
  12121. }
  12122. func (m *Event) Unmarshal(dAtA []byte) error {
  12123. l := len(dAtA)
  12124. iNdEx := 0
  12125. for iNdEx < l {
  12126. preIndex := iNdEx
  12127. var wire uint64
  12128. for shift := uint(0); ; shift += 7 {
  12129. if shift >= 64 {
  12130. return ErrIntOverflowTypes
  12131. }
  12132. if iNdEx >= l {
  12133. return io.ErrUnexpectedEOF
  12134. }
  12135. b := dAtA[iNdEx]
  12136. iNdEx++
  12137. wire |= uint64(b&0x7F) << shift
  12138. if b < 0x80 {
  12139. break
  12140. }
  12141. }
  12142. fieldNum := int32(wire >> 3)
  12143. wireType := int(wire & 0x7)
  12144. if wireType == 4 {
  12145. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  12146. }
  12147. if fieldNum <= 0 {
  12148. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  12149. }
  12150. switch fieldNum {
  12151. case 1:
  12152. if wireType != 2 {
  12153. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12154. }
  12155. var stringLen uint64
  12156. for shift := uint(0); ; shift += 7 {
  12157. if shift >= 64 {
  12158. return ErrIntOverflowTypes
  12159. }
  12160. if iNdEx >= l {
  12161. return io.ErrUnexpectedEOF
  12162. }
  12163. b := dAtA[iNdEx]
  12164. iNdEx++
  12165. stringLen |= uint64(b&0x7F) << shift
  12166. if b < 0x80 {
  12167. break
  12168. }
  12169. }
  12170. intStringLen := int(stringLen)
  12171. if intStringLen < 0 {
  12172. return ErrInvalidLengthTypes
  12173. }
  12174. postIndex := iNdEx + intStringLen
  12175. if postIndex < 0 {
  12176. return ErrInvalidLengthTypes
  12177. }
  12178. if postIndex > l {
  12179. return io.ErrUnexpectedEOF
  12180. }
  12181. m.Type = string(dAtA[iNdEx:postIndex])
  12182. iNdEx = postIndex
  12183. case 2:
  12184. if wireType != 2 {
  12185. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  12186. }
  12187. var msglen int
  12188. for shift := uint(0); ; shift += 7 {
  12189. if shift >= 64 {
  12190. return ErrIntOverflowTypes
  12191. }
  12192. if iNdEx >= l {
  12193. return io.ErrUnexpectedEOF
  12194. }
  12195. b := dAtA[iNdEx]
  12196. iNdEx++
  12197. msglen |= int(b&0x7F) << shift
  12198. if b < 0x80 {
  12199. break
  12200. }
  12201. }
  12202. if msglen < 0 {
  12203. return ErrInvalidLengthTypes
  12204. }
  12205. postIndex := iNdEx + msglen
  12206. if postIndex < 0 {
  12207. return ErrInvalidLengthTypes
  12208. }
  12209. if postIndex > l {
  12210. return io.ErrUnexpectedEOF
  12211. }
  12212. m.Attributes = append(m.Attributes, EventAttribute{})
  12213. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12214. return err
  12215. }
  12216. iNdEx = postIndex
  12217. default:
  12218. iNdEx = preIndex
  12219. skippy, err := skipTypes(dAtA[iNdEx:])
  12220. if err != nil {
  12221. return err
  12222. }
  12223. if skippy < 0 {
  12224. return ErrInvalidLengthTypes
  12225. }
  12226. if (iNdEx + skippy) < 0 {
  12227. return ErrInvalidLengthTypes
  12228. }
  12229. if (iNdEx + skippy) > l {
  12230. return io.ErrUnexpectedEOF
  12231. }
  12232. iNdEx += skippy
  12233. }
  12234. }
  12235. if iNdEx > l {
  12236. return io.ErrUnexpectedEOF
  12237. }
  12238. return nil
  12239. }
  12240. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  12241. l := len(dAtA)
  12242. iNdEx := 0
  12243. for iNdEx < l {
  12244. preIndex := iNdEx
  12245. var wire uint64
  12246. for shift := uint(0); ; shift += 7 {
  12247. if shift >= 64 {
  12248. return ErrIntOverflowTypes
  12249. }
  12250. if iNdEx >= l {
  12251. return io.ErrUnexpectedEOF
  12252. }
  12253. b := dAtA[iNdEx]
  12254. iNdEx++
  12255. wire |= uint64(b&0x7F) << shift
  12256. if b < 0x80 {
  12257. break
  12258. }
  12259. }
  12260. fieldNum := int32(wire >> 3)
  12261. wireType := int(wire & 0x7)
  12262. if wireType == 4 {
  12263. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  12264. }
  12265. if fieldNum <= 0 {
  12266. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  12267. }
  12268. switch fieldNum {
  12269. case 1:
  12270. if wireType != 2 {
  12271. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  12272. }
  12273. var byteLen int
  12274. for shift := uint(0); ; shift += 7 {
  12275. if shift >= 64 {
  12276. return ErrIntOverflowTypes
  12277. }
  12278. if iNdEx >= l {
  12279. return io.ErrUnexpectedEOF
  12280. }
  12281. b := dAtA[iNdEx]
  12282. iNdEx++
  12283. byteLen |= int(b&0x7F) << shift
  12284. if b < 0x80 {
  12285. break
  12286. }
  12287. }
  12288. if byteLen < 0 {
  12289. return ErrInvalidLengthTypes
  12290. }
  12291. postIndex := iNdEx + byteLen
  12292. if postIndex < 0 {
  12293. return ErrInvalidLengthTypes
  12294. }
  12295. if postIndex > l {
  12296. return io.ErrUnexpectedEOF
  12297. }
  12298. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  12299. if m.Key == nil {
  12300. m.Key = []byte{}
  12301. }
  12302. iNdEx = postIndex
  12303. case 2:
  12304. if wireType != 2 {
  12305. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  12306. }
  12307. var byteLen int
  12308. for shift := uint(0); ; shift += 7 {
  12309. if shift >= 64 {
  12310. return ErrIntOverflowTypes
  12311. }
  12312. if iNdEx >= l {
  12313. return io.ErrUnexpectedEOF
  12314. }
  12315. b := dAtA[iNdEx]
  12316. iNdEx++
  12317. byteLen |= int(b&0x7F) << shift
  12318. if b < 0x80 {
  12319. break
  12320. }
  12321. }
  12322. if byteLen < 0 {
  12323. return ErrInvalidLengthTypes
  12324. }
  12325. postIndex := iNdEx + byteLen
  12326. if postIndex < 0 {
  12327. return ErrInvalidLengthTypes
  12328. }
  12329. if postIndex > l {
  12330. return io.ErrUnexpectedEOF
  12331. }
  12332. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  12333. if m.Value == nil {
  12334. m.Value = []byte{}
  12335. }
  12336. iNdEx = postIndex
  12337. case 3:
  12338. if wireType != 0 {
  12339. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12340. }
  12341. var v int
  12342. for shift := uint(0); ; shift += 7 {
  12343. if shift >= 64 {
  12344. return ErrIntOverflowTypes
  12345. }
  12346. if iNdEx >= l {
  12347. return io.ErrUnexpectedEOF
  12348. }
  12349. b := dAtA[iNdEx]
  12350. iNdEx++
  12351. v |= int(b&0x7F) << shift
  12352. if b < 0x80 {
  12353. break
  12354. }
  12355. }
  12356. m.Index = bool(v != 0)
  12357. default:
  12358. iNdEx = preIndex
  12359. skippy, err := skipTypes(dAtA[iNdEx:])
  12360. if err != nil {
  12361. return err
  12362. }
  12363. if skippy < 0 {
  12364. return ErrInvalidLengthTypes
  12365. }
  12366. if (iNdEx + skippy) < 0 {
  12367. return ErrInvalidLengthTypes
  12368. }
  12369. if (iNdEx + skippy) > l {
  12370. return io.ErrUnexpectedEOF
  12371. }
  12372. iNdEx += skippy
  12373. }
  12374. }
  12375. if iNdEx > l {
  12376. return io.ErrUnexpectedEOF
  12377. }
  12378. return nil
  12379. }
  12380. func (m *TxResult) Unmarshal(dAtA []byte) error {
  12381. l := len(dAtA)
  12382. iNdEx := 0
  12383. for iNdEx < l {
  12384. preIndex := iNdEx
  12385. var wire uint64
  12386. for shift := uint(0); ; shift += 7 {
  12387. if shift >= 64 {
  12388. return ErrIntOverflowTypes
  12389. }
  12390. if iNdEx >= l {
  12391. return io.ErrUnexpectedEOF
  12392. }
  12393. b := dAtA[iNdEx]
  12394. iNdEx++
  12395. wire |= uint64(b&0x7F) << shift
  12396. if b < 0x80 {
  12397. break
  12398. }
  12399. }
  12400. fieldNum := int32(wire >> 3)
  12401. wireType := int(wire & 0x7)
  12402. if wireType == 4 {
  12403. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  12404. }
  12405. if fieldNum <= 0 {
  12406. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  12407. }
  12408. switch fieldNum {
  12409. case 1:
  12410. if wireType != 0 {
  12411. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12412. }
  12413. m.Height = 0
  12414. for shift := uint(0); ; shift += 7 {
  12415. if shift >= 64 {
  12416. return ErrIntOverflowTypes
  12417. }
  12418. if iNdEx >= l {
  12419. return io.ErrUnexpectedEOF
  12420. }
  12421. b := dAtA[iNdEx]
  12422. iNdEx++
  12423. m.Height |= int64(b&0x7F) << shift
  12424. if b < 0x80 {
  12425. break
  12426. }
  12427. }
  12428. case 2:
  12429. if wireType != 0 {
  12430. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12431. }
  12432. m.Index = 0
  12433. for shift := uint(0); ; shift += 7 {
  12434. if shift >= 64 {
  12435. return ErrIntOverflowTypes
  12436. }
  12437. if iNdEx >= l {
  12438. return io.ErrUnexpectedEOF
  12439. }
  12440. b := dAtA[iNdEx]
  12441. iNdEx++
  12442. m.Index |= uint32(b&0x7F) << shift
  12443. if b < 0x80 {
  12444. break
  12445. }
  12446. }
  12447. case 3:
  12448. if wireType != 2 {
  12449. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  12450. }
  12451. var byteLen int
  12452. for shift := uint(0); ; shift += 7 {
  12453. if shift >= 64 {
  12454. return ErrIntOverflowTypes
  12455. }
  12456. if iNdEx >= l {
  12457. return io.ErrUnexpectedEOF
  12458. }
  12459. b := dAtA[iNdEx]
  12460. iNdEx++
  12461. byteLen |= int(b&0x7F) << shift
  12462. if b < 0x80 {
  12463. break
  12464. }
  12465. }
  12466. if byteLen < 0 {
  12467. return ErrInvalidLengthTypes
  12468. }
  12469. postIndex := iNdEx + byteLen
  12470. if postIndex < 0 {
  12471. return ErrInvalidLengthTypes
  12472. }
  12473. if postIndex > l {
  12474. return io.ErrUnexpectedEOF
  12475. }
  12476. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  12477. if m.Tx == nil {
  12478. m.Tx = []byte{}
  12479. }
  12480. iNdEx = postIndex
  12481. case 4:
  12482. if wireType != 2 {
  12483. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12484. }
  12485. var msglen int
  12486. for shift := uint(0); ; shift += 7 {
  12487. if shift >= 64 {
  12488. return ErrIntOverflowTypes
  12489. }
  12490. if iNdEx >= l {
  12491. return io.ErrUnexpectedEOF
  12492. }
  12493. b := dAtA[iNdEx]
  12494. iNdEx++
  12495. msglen |= int(b&0x7F) << shift
  12496. if b < 0x80 {
  12497. break
  12498. }
  12499. }
  12500. if msglen < 0 {
  12501. return ErrInvalidLengthTypes
  12502. }
  12503. postIndex := iNdEx + msglen
  12504. if postIndex < 0 {
  12505. return ErrInvalidLengthTypes
  12506. }
  12507. if postIndex > l {
  12508. return io.ErrUnexpectedEOF
  12509. }
  12510. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12511. return err
  12512. }
  12513. iNdEx = postIndex
  12514. default:
  12515. iNdEx = preIndex
  12516. skippy, err := skipTypes(dAtA[iNdEx:])
  12517. if err != nil {
  12518. return err
  12519. }
  12520. if skippy < 0 {
  12521. return ErrInvalidLengthTypes
  12522. }
  12523. if (iNdEx + skippy) < 0 {
  12524. return ErrInvalidLengthTypes
  12525. }
  12526. if (iNdEx + skippy) > l {
  12527. return io.ErrUnexpectedEOF
  12528. }
  12529. iNdEx += skippy
  12530. }
  12531. }
  12532. if iNdEx > l {
  12533. return io.ErrUnexpectedEOF
  12534. }
  12535. return nil
  12536. }
  12537. func (m *Validator) Unmarshal(dAtA []byte) error {
  12538. l := len(dAtA)
  12539. iNdEx := 0
  12540. for iNdEx < l {
  12541. preIndex := iNdEx
  12542. var wire uint64
  12543. for shift := uint(0); ; shift += 7 {
  12544. if shift >= 64 {
  12545. return ErrIntOverflowTypes
  12546. }
  12547. if iNdEx >= l {
  12548. return io.ErrUnexpectedEOF
  12549. }
  12550. b := dAtA[iNdEx]
  12551. iNdEx++
  12552. wire |= uint64(b&0x7F) << shift
  12553. if b < 0x80 {
  12554. break
  12555. }
  12556. }
  12557. fieldNum := int32(wire >> 3)
  12558. wireType := int(wire & 0x7)
  12559. if wireType == 4 {
  12560. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  12561. }
  12562. if fieldNum <= 0 {
  12563. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  12564. }
  12565. switch fieldNum {
  12566. case 1:
  12567. if wireType != 2 {
  12568. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  12569. }
  12570. var byteLen int
  12571. for shift := uint(0); ; shift += 7 {
  12572. if shift >= 64 {
  12573. return ErrIntOverflowTypes
  12574. }
  12575. if iNdEx >= l {
  12576. return io.ErrUnexpectedEOF
  12577. }
  12578. b := dAtA[iNdEx]
  12579. iNdEx++
  12580. byteLen |= int(b&0x7F) << shift
  12581. if b < 0x80 {
  12582. break
  12583. }
  12584. }
  12585. if byteLen < 0 {
  12586. return ErrInvalidLengthTypes
  12587. }
  12588. postIndex := iNdEx + byteLen
  12589. if postIndex < 0 {
  12590. return ErrInvalidLengthTypes
  12591. }
  12592. if postIndex > l {
  12593. return io.ErrUnexpectedEOF
  12594. }
  12595. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  12596. if m.Address == nil {
  12597. m.Address = []byte{}
  12598. }
  12599. iNdEx = postIndex
  12600. case 3:
  12601. if wireType != 0 {
  12602. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12603. }
  12604. m.Power = 0
  12605. for shift := uint(0); ; shift += 7 {
  12606. if shift >= 64 {
  12607. return ErrIntOverflowTypes
  12608. }
  12609. if iNdEx >= l {
  12610. return io.ErrUnexpectedEOF
  12611. }
  12612. b := dAtA[iNdEx]
  12613. iNdEx++
  12614. m.Power |= int64(b&0x7F) << shift
  12615. if b < 0x80 {
  12616. break
  12617. }
  12618. }
  12619. default:
  12620. iNdEx = preIndex
  12621. skippy, err := skipTypes(dAtA[iNdEx:])
  12622. if err != nil {
  12623. return err
  12624. }
  12625. if skippy < 0 {
  12626. return ErrInvalidLengthTypes
  12627. }
  12628. if (iNdEx + skippy) < 0 {
  12629. return ErrInvalidLengthTypes
  12630. }
  12631. if (iNdEx + skippy) > l {
  12632. return io.ErrUnexpectedEOF
  12633. }
  12634. iNdEx += skippy
  12635. }
  12636. }
  12637. if iNdEx > l {
  12638. return io.ErrUnexpectedEOF
  12639. }
  12640. return nil
  12641. }
  12642. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12643. l := len(dAtA)
  12644. iNdEx := 0
  12645. for iNdEx < l {
  12646. preIndex := iNdEx
  12647. var wire uint64
  12648. for shift := uint(0); ; shift += 7 {
  12649. if shift >= 64 {
  12650. return ErrIntOverflowTypes
  12651. }
  12652. if iNdEx >= l {
  12653. return io.ErrUnexpectedEOF
  12654. }
  12655. b := dAtA[iNdEx]
  12656. iNdEx++
  12657. wire |= uint64(b&0x7F) << shift
  12658. if b < 0x80 {
  12659. break
  12660. }
  12661. }
  12662. fieldNum := int32(wire >> 3)
  12663. wireType := int(wire & 0x7)
  12664. if wireType == 4 {
  12665. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12666. }
  12667. if fieldNum <= 0 {
  12668. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12669. }
  12670. switch fieldNum {
  12671. case 1:
  12672. if wireType != 2 {
  12673. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12674. }
  12675. var msglen int
  12676. for shift := uint(0); ; shift += 7 {
  12677. if shift >= 64 {
  12678. return ErrIntOverflowTypes
  12679. }
  12680. if iNdEx >= l {
  12681. return io.ErrUnexpectedEOF
  12682. }
  12683. b := dAtA[iNdEx]
  12684. iNdEx++
  12685. msglen |= int(b&0x7F) << shift
  12686. if b < 0x80 {
  12687. break
  12688. }
  12689. }
  12690. if msglen < 0 {
  12691. return ErrInvalidLengthTypes
  12692. }
  12693. postIndex := iNdEx + msglen
  12694. if postIndex < 0 {
  12695. return ErrInvalidLengthTypes
  12696. }
  12697. if postIndex > l {
  12698. return io.ErrUnexpectedEOF
  12699. }
  12700. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12701. return err
  12702. }
  12703. iNdEx = postIndex
  12704. case 2:
  12705. if wireType != 0 {
  12706. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12707. }
  12708. m.Power = 0
  12709. for shift := uint(0); ; shift += 7 {
  12710. if shift >= 64 {
  12711. return ErrIntOverflowTypes
  12712. }
  12713. if iNdEx >= l {
  12714. return io.ErrUnexpectedEOF
  12715. }
  12716. b := dAtA[iNdEx]
  12717. iNdEx++
  12718. m.Power |= int64(b&0x7F) << shift
  12719. if b < 0x80 {
  12720. break
  12721. }
  12722. }
  12723. default:
  12724. iNdEx = preIndex
  12725. skippy, err := skipTypes(dAtA[iNdEx:])
  12726. if err != nil {
  12727. return err
  12728. }
  12729. if skippy < 0 {
  12730. return ErrInvalidLengthTypes
  12731. }
  12732. if (iNdEx + skippy) < 0 {
  12733. return ErrInvalidLengthTypes
  12734. }
  12735. if (iNdEx + skippy) > l {
  12736. return io.ErrUnexpectedEOF
  12737. }
  12738. iNdEx += skippy
  12739. }
  12740. }
  12741. if iNdEx > l {
  12742. return io.ErrUnexpectedEOF
  12743. }
  12744. return nil
  12745. }
  12746. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12747. l := len(dAtA)
  12748. iNdEx := 0
  12749. for iNdEx < l {
  12750. preIndex := iNdEx
  12751. var wire uint64
  12752. for shift := uint(0); ; shift += 7 {
  12753. if shift >= 64 {
  12754. return ErrIntOverflowTypes
  12755. }
  12756. if iNdEx >= l {
  12757. return io.ErrUnexpectedEOF
  12758. }
  12759. b := dAtA[iNdEx]
  12760. iNdEx++
  12761. wire |= uint64(b&0x7F) << shift
  12762. if b < 0x80 {
  12763. break
  12764. }
  12765. }
  12766. fieldNum := int32(wire >> 3)
  12767. wireType := int(wire & 0x7)
  12768. if wireType == 4 {
  12769. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12770. }
  12771. if fieldNum <= 0 {
  12772. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12773. }
  12774. switch fieldNum {
  12775. case 1:
  12776. if wireType != 2 {
  12777. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12778. }
  12779. var msglen int
  12780. for shift := uint(0); ; shift += 7 {
  12781. if shift >= 64 {
  12782. return ErrIntOverflowTypes
  12783. }
  12784. if iNdEx >= l {
  12785. return io.ErrUnexpectedEOF
  12786. }
  12787. b := dAtA[iNdEx]
  12788. iNdEx++
  12789. msglen |= int(b&0x7F) << shift
  12790. if b < 0x80 {
  12791. break
  12792. }
  12793. }
  12794. if msglen < 0 {
  12795. return ErrInvalidLengthTypes
  12796. }
  12797. postIndex := iNdEx + msglen
  12798. if postIndex < 0 {
  12799. return ErrInvalidLengthTypes
  12800. }
  12801. if postIndex > l {
  12802. return io.ErrUnexpectedEOF
  12803. }
  12804. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12805. return err
  12806. }
  12807. iNdEx = postIndex
  12808. case 2:
  12809. if wireType != 0 {
  12810. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12811. }
  12812. var v int
  12813. for shift := uint(0); ; shift += 7 {
  12814. if shift >= 64 {
  12815. return ErrIntOverflowTypes
  12816. }
  12817. if iNdEx >= l {
  12818. return io.ErrUnexpectedEOF
  12819. }
  12820. b := dAtA[iNdEx]
  12821. iNdEx++
  12822. v |= int(b&0x7F) << shift
  12823. if b < 0x80 {
  12824. break
  12825. }
  12826. }
  12827. m.SignedLastBlock = bool(v != 0)
  12828. default:
  12829. iNdEx = preIndex
  12830. skippy, err := skipTypes(dAtA[iNdEx:])
  12831. if err != nil {
  12832. return err
  12833. }
  12834. if skippy < 0 {
  12835. return ErrInvalidLengthTypes
  12836. }
  12837. if (iNdEx + skippy) < 0 {
  12838. return ErrInvalidLengthTypes
  12839. }
  12840. if (iNdEx + skippy) > l {
  12841. return io.ErrUnexpectedEOF
  12842. }
  12843. iNdEx += skippy
  12844. }
  12845. }
  12846. if iNdEx > l {
  12847. return io.ErrUnexpectedEOF
  12848. }
  12849. return nil
  12850. }
  12851. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12852. l := len(dAtA)
  12853. iNdEx := 0
  12854. for iNdEx < l {
  12855. preIndex := iNdEx
  12856. var wire uint64
  12857. for shift := uint(0); ; shift += 7 {
  12858. if shift >= 64 {
  12859. return ErrIntOverflowTypes
  12860. }
  12861. if iNdEx >= l {
  12862. return io.ErrUnexpectedEOF
  12863. }
  12864. b := dAtA[iNdEx]
  12865. iNdEx++
  12866. wire |= uint64(b&0x7F) << shift
  12867. if b < 0x80 {
  12868. break
  12869. }
  12870. }
  12871. fieldNum := int32(wire >> 3)
  12872. wireType := int(wire & 0x7)
  12873. if wireType == 4 {
  12874. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12875. }
  12876. if fieldNum <= 0 {
  12877. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12878. }
  12879. switch fieldNum {
  12880. case 1:
  12881. if wireType != 0 {
  12882. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12883. }
  12884. m.Type = 0
  12885. for shift := uint(0); ; shift += 7 {
  12886. if shift >= 64 {
  12887. return ErrIntOverflowTypes
  12888. }
  12889. if iNdEx >= l {
  12890. return io.ErrUnexpectedEOF
  12891. }
  12892. b := dAtA[iNdEx]
  12893. iNdEx++
  12894. m.Type |= EvidenceType(b&0x7F) << shift
  12895. if b < 0x80 {
  12896. break
  12897. }
  12898. }
  12899. case 2:
  12900. if wireType != 2 {
  12901. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12902. }
  12903. var msglen int
  12904. for shift := uint(0); ; shift += 7 {
  12905. if shift >= 64 {
  12906. return ErrIntOverflowTypes
  12907. }
  12908. if iNdEx >= l {
  12909. return io.ErrUnexpectedEOF
  12910. }
  12911. b := dAtA[iNdEx]
  12912. iNdEx++
  12913. msglen |= int(b&0x7F) << shift
  12914. if b < 0x80 {
  12915. break
  12916. }
  12917. }
  12918. if msglen < 0 {
  12919. return ErrInvalidLengthTypes
  12920. }
  12921. postIndex := iNdEx + msglen
  12922. if postIndex < 0 {
  12923. return ErrInvalidLengthTypes
  12924. }
  12925. if postIndex > l {
  12926. return io.ErrUnexpectedEOF
  12927. }
  12928. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12929. return err
  12930. }
  12931. iNdEx = postIndex
  12932. case 3:
  12933. if wireType != 0 {
  12934. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12935. }
  12936. m.Height = 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.Height |= int64(b&0x7F) << shift
  12947. if b < 0x80 {
  12948. break
  12949. }
  12950. }
  12951. case 4:
  12952. if wireType != 2 {
  12953. return fmt.Errorf("proto: wrong wireType = %d for field Time", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  12981. return err
  12982. }
  12983. iNdEx = postIndex
  12984. case 5:
  12985. if wireType != 0 {
  12986. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  12987. }
  12988. m.TotalVotingPower = 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.TotalVotingPower |= int64(b&0x7F) << shift
  12999. if b < 0x80 {
  13000. break
  13001. }
  13002. }
  13003. default:
  13004. iNdEx = preIndex
  13005. skippy, err := skipTypes(dAtA[iNdEx:])
  13006. if err != nil {
  13007. return err
  13008. }
  13009. if skippy < 0 {
  13010. return ErrInvalidLengthTypes
  13011. }
  13012. if (iNdEx + skippy) < 0 {
  13013. return ErrInvalidLengthTypes
  13014. }
  13015. if (iNdEx + skippy) > l {
  13016. return io.ErrUnexpectedEOF
  13017. }
  13018. iNdEx += skippy
  13019. }
  13020. }
  13021. if iNdEx > l {
  13022. return io.ErrUnexpectedEOF
  13023. }
  13024. return nil
  13025. }
  13026. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  13027. l := len(dAtA)
  13028. iNdEx := 0
  13029. for iNdEx < l {
  13030. preIndex := iNdEx
  13031. var wire uint64
  13032. for shift := uint(0); ; shift += 7 {
  13033. if shift >= 64 {
  13034. return ErrIntOverflowTypes
  13035. }
  13036. if iNdEx >= l {
  13037. return io.ErrUnexpectedEOF
  13038. }
  13039. b := dAtA[iNdEx]
  13040. iNdEx++
  13041. wire |= uint64(b&0x7F) << shift
  13042. if b < 0x80 {
  13043. break
  13044. }
  13045. }
  13046. fieldNum := int32(wire >> 3)
  13047. wireType := int(wire & 0x7)
  13048. if wireType == 4 {
  13049. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  13050. }
  13051. if fieldNum <= 0 {
  13052. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  13053. }
  13054. switch fieldNum {
  13055. case 1:
  13056. if wireType != 0 {
  13057. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  13058. }
  13059. m.Height = 0
  13060. for shift := uint(0); ; shift += 7 {
  13061. if shift >= 64 {
  13062. return ErrIntOverflowTypes
  13063. }
  13064. if iNdEx >= l {
  13065. return io.ErrUnexpectedEOF
  13066. }
  13067. b := dAtA[iNdEx]
  13068. iNdEx++
  13069. m.Height |= uint64(b&0x7F) << shift
  13070. if b < 0x80 {
  13071. break
  13072. }
  13073. }
  13074. case 2:
  13075. if wireType != 0 {
  13076. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  13077. }
  13078. m.Format = 0
  13079. for shift := uint(0); ; shift += 7 {
  13080. if shift >= 64 {
  13081. return ErrIntOverflowTypes
  13082. }
  13083. if iNdEx >= l {
  13084. return io.ErrUnexpectedEOF
  13085. }
  13086. b := dAtA[iNdEx]
  13087. iNdEx++
  13088. m.Format |= uint32(b&0x7F) << shift
  13089. if b < 0x80 {
  13090. break
  13091. }
  13092. }
  13093. case 3:
  13094. if wireType != 0 {
  13095. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  13096. }
  13097. m.Chunks = 0
  13098. for shift := uint(0); ; shift += 7 {
  13099. if shift >= 64 {
  13100. return ErrIntOverflowTypes
  13101. }
  13102. if iNdEx >= l {
  13103. return io.ErrUnexpectedEOF
  13104. }
  13105. b := dAtA[iNdEx]
  13106. iNdEx++
  13107. m.Chunks |= uint32(b&0x7F) << shift
  13108. if b < 0x80 {
  13109. break
  13110. }
  13111. }
  13112. case 4:
  13113. if wireType != 2 {
  13114. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  13115. }
  13116. var byteLen int
  13117. for shift := uint(0); ; shift += 7 {
  13118. if shift >= 64 {
  13119. return ErrIntOverflowTypes
  13120. }
  13121. if iNdEx >= l {
  13122. return io.ErrUnexpectedEOF
  13123. }
  13124. b := dAtA[iNdEx]
  13125. iNdEx++
  13126. byteLen |= int(b&0x7F) << shift
  13127. if b < 0x80 {
  13128. break
  13129. }
  13130. }
  13131. if byteLen < 0 {
  13132. return ErrInvalidLengthTypes
  13133. }
  13134. postIndex := iNdEx + byteLen
  13135. if postIndex < 0 {
  13136. return ErrInvalidLengthTypes
  13137. }
  13138. if postIndex > l {
  13139. return io.ErrUnexpectedEOF
  13140. }
  13141. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  13142. if m.Hash == nil {
  13143. m.Hash = []byte{}
  13144. }
  13145. iNdEx = postIndex
  13146. case 5:
  13147. if wireType != 2 {
  13148. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  13149. }
  13150. var byteLen int
  13151. for shift := uint(0); ; shift += 7 {
  13152. if shift >= 64 {
  13153. return ErrIntOverflowTypes
  13154. }
  13155. if iNdEx >= l {
  13156. return io.ErrUnexpectedEOF
  13157. }
  13158. b := dAtA[iNdEx]
  13159. iNdEx++
  13160. byteLen |= int(b&0x7F) << shift
  13161. if b < 0x80 {
  13162. break
  13163. }
  13164. }
  13165. if byteLen < 0 {
  13166. return ErrInvalidLengthTypes
  13167. }
  13168. postIndex := iNdEx + byteLen
  13169. if postIndex < 0 {
  13170. return ErrInvalidLengthTypes
  13171. }
  13172. if postIndex > l {
  13173. return io.ErrUnexpectedEOF
  13174. }
  13175. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  13176. if m.Metadata == nil {
  13177. m.Metadata = []byte{}
  13178. }
  13179. iNdEx = postIndex
  13180. default:
  13181. iNdEx = preIndex
  13182. skippy, err := skipTypes(dAtA[iNdEx:])
  13183. if err != nil {
  13184. return err
  13185. }
  13186. if skippy < 0 {
  13187. return ErrInvalidLengthTypes
  13188. }
  13189. if (iNdEx + skippy) < 0 {
  13190. return ErrInvalidLengthTypes
  13191. }
  13192. if (iNdEx + skippy) > l {
  13193. return io.ErrUnexpectedEOF
  13194. }
  13195. iNdEx += skippy
  13196. }
  13197. }
  13198. if iNdEx > l {
  13199. return io.ErrUnexpectedEOF
  13200. }
  13201. return nil
  13202. }
  13203. func skipTypes(dAtA []byte) (n int, err error) {
  13204. l := len(dAtA)
  13205. iNdEx := 0
  13206. depth := 0
  13207. for iNdEx < l {
  13208. var wire uint64
  13209. for shift := uint(0); ; shift += 7 {
  13210. if shift >= 64 {
  13211. return 0, ErrIntOverflowTypes
  13212. }
  13213. if iNdEx >= l {
  13214. return 0, io.ErrUnexpectedEOF
  13215. }
  13216. b := dAtA[iNdEx]
  13217. iNdEx++
  13218. wire |= (uint64(b) & 0x7F) << shift
  13219. if b < 0x80 {
  13220. break
  13221. }
  13222. }
  13223. wireType := int(wire & 0x7)
  13224. switch wireType {
  13225. case 0:
  13226. for shift := uint(0); ; shift += 7 {
  13227. if shift >= 64 {
  13228. return 0, ErrIntOverflowTypes
  13229. }
  13230. if iNdEx >= l {
  13231. return 0, io.ErrUnexpectedEOF
  13232. }
  13233. iNdEx++
  13234. if dAtA[iNdEx-1] < 0x80 {
  13235. break
  13236. }
  13237. }
  13238. case 1:
  13239. iNdEx += 8
  13240. case 2:
  13241. var length int
  13242. for shift := uint(0); ; shift += 7 {
  13243. if shift >= 64 {
  13244. return 0, ErrIntOverflowTypes
  13245. }
  13246. if iNdEx >= l {
  13247. return 0, io.ErrUnexpectedEOF
  13248. }
  13249. b := dAtA[iNdEx]
  13250. iNdEx++
  13251. length |= (int(b) & 0x7F) << shift
  13252. if b < 0x80 {
  13253. break
  13254. }
  13255. }
  13256. if length < 0 {
  13257. return 0, ErrInvalidLengthTypes
  13258. }
  13259. iNdEx += length
  13260. case 3:
  13261. depth++
  13262. case 4:
  13263. if depth == 0 {
  13264. return 0, ErrUnexpectedEndOfGroupTypes
  13265. }
  13266. depth--
  13267. case 5:
  13268. iNdEx += 4
  13269. default:
  13270. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  13271. }
  13272. if iNdEx < 0 {
  13273. return 0, ErrInvalidLengthTypes
  13274. }
  13275. if depth == 0 {
  13276. return iNdEx, nil
  13277. }
  13278. }
  13279. return 0, io.ErrUnexpectedEOF
  13280. }
  13281. var (
  13282. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  13283. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  13284. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  13285. )