From 2f9de6d0cd1f6bba156f553ac3f22cbc562718b2 Mon Sep 17 00:00:00 2001 From: melonux <48902925+melonux@users.noreply.github.com> Date: Thu, 29 May 2025 11:43:55 +0000 Subject: [PATCH] Add GSM risk assessment integration for transaction filtering --- GSM.md | 114 ++ README.md | 6 + core/txpool/legacypool/legacypool.go | 135 +- go.mod | 10 +- go.sum | 38 +- gsm/proto/v1/risk_control.pb.go | 2127 ++++++++++++++++++++++++++ gsm/proto/v1/risk_control_grpc.pb.go | 421 +++++ gsm/risk.go | 241 +++ internal/ethapi/api.go | 19 +- 9 files changed, 3089 insertions(+), 22 deletions(-) create mode 100644 GSM.md create mode 100644 gsm/proto/v1/risk_control.pb.go create mode 100644 gsm/proto/v1/risk_control_grpc.pb.go create mode 100644 gsm/risk.go diff --git a/GSM.md b/GSM.md new file mode 100644 index 0000000000..06fbb900d0 --- /dev/null +++ b/GSM.md @@ -0,0 +1,114 @@ +# Architectural Framework for Proactive Transaction Security in BSC Geth Nodes via Native GSM Integration + +## Summary + +This document outlines a strategic initiative to enhance the security posture of the Binance Smart Chain (BSC) by natively integrating the GoPlus Security Module (GSM), a centralized transaction assessment engine, directly into the BSC Geth validator nodes. The proposed architecture introduces a robust, two-stage security scanning framework designed to proactively identify and mitigate malicious transactions before they are committed to a block. The first stage intercepts individual transactions upon submission for a rapid preliminary check, while the second stage performs a sophisticated, contextual batch analysis on transactions prior to their promotion to the `pending` state in the mempool. + +Performance benchmarks demonstrate that this integration is highly efficient, with negligible impact on node latency and block production throughput, thanks to optimized gRPC interfaces and caching mechanisms. While the design significantly elevates on-chain security, we also analyze current limitations, such as redundant cross-validator checks and reliance on a remote service. To address these, we propose a forward-looking roadmap that includes decentralizing the security service, optimizing data payloads via hash-based pre-flight checks, and developing a hybrid model with embedded core logic for critical, non-negotiable security rules. This initiative marks a pivotal shift from optional, client-side security to a mandatory, protocol-level defense mechanism, fundamentally strengthening the integrity and trustworthiness of the BSC network. + +--- + +## 1. Introduction and Motivation + +The Binance Smart Chain (BSC) stands as a prominent blockchain platform, distinguished by its high throughput and low transaction fees. Its Proof of Staked Authority (PoSA) consensus mechanism, driven by a limited set of active validators, provides a blend of performance and decentralization that has fostered a vibrant ecosystem of decentralized applications. + +However, like all public ledgers, BSC faces a persistent landscape of threats from malicious actors. These threats range from attempts to exploit smart contract vulnerabilities to the submission of fraudulent transactions designed to compromise network integrity. As the ecosystem's complexity and value grow, the need for a robust, on-chain security apparatus has become paramount. + +To date, services like the GoPlus Security Module (GSM)—a high-speed transaction security assessment engine—have primarily operated at the client-side, offering users an optional layer of protection within Web3 wallets. While beneficial, this approach places the onus of security on the end-user and cannot guarantee network-wide protection. + +This proposal details a paradigm shift: the direct, native integration of GSM into the BSC Geth validator nodes. By embedding security validation at the consensus layer, we empower validators to proactively vet all transactions before they are considered for block inclusion. This moves security from an optional feature to an intrinsic property of the network, creating a formidable defense against on-chain attacks and significantly enhancing the overall security, reliability, and trust of the BSC ecosystem. + +## 2. Architectural Design: A Two-Stage Scanning Framework + +The core of our design is a layered, two-stage scanning process that intercepts transactions at critical points within the Geth transaction lifecycle. + +#### **Stage 1: Pre-Mempool Transaction Interception** + +This stage functions as the system's frontline defense. When a new transaction is submitted to the node (e.g., via the `eth_sendRawTransaction` RPC call), it is immediately scanned by GSM _before_ being admitted into the transaction pool (mempool). + +- **Objective:** To instantly reject overtly malicious transactions, such as those originating from addresses on established blacklists or interacting with known malicious contracts. +- **Benefit:** This preemptive filtering conserves significant node resources and network bandwidth by preventing toxic transactions from propagating to peers or consuming mempool memory. + +#### **Stage 2: Contextual Batch Analysis Before Pending Promotion** + +The second, more sophisticated scan occurs just before a batch of transactions is promoted from the `queued` state to the `pending` state within the mempool. The `pending` pool contains executable transactions that are candidates for inclusion in the next block. + +- **Objective:** To conduct deep, contextual analysis on sequences of transactions. At this stage, transactions from the same sender are ordered by nonce, enabling GSM to detect complex, multi-step attack patterns. +- **Capabilities:** + - **Exploit Detection:** Identifying sequenced calls designed to exploit contract vulnerabilities (e.g., re-entrancy attacks). + - **Behavioral Analysis:** Detecting manipulative patterns like wash trading that are only visible across multiple transactions. + - **Cumulative Risk Assessment:** Evaluating the aggregate risk of a transaction sequence, providing insights that isolated checks cannot. + +A crucial component of this architecture is the **GSM caching mechanism**, which stores recent scan results. This ensures that high-frequency, benign transactions are not repeatedly re-evaluated, thereby maintaining high throughput and low latency. + +## 3. Performance Analysis and Integration Strategy + +GSM provides two high-performance gRPC endpoints: `EVMRiskScore` for single transactions and `EVMBatchRiskScore` for batch analysis. All benchmarks were conducted on a BSC validator with server-side caching disabled, representing a worst-case performance scenario. + +- **`EVMRiskScore`:** This interface evaluates the security of a single transaction. + + - On a BSC validator, a single call to `EVMRiskScore` exhibits the following latencies: + - **P50:** 52 ms + - **P90:** 77 ms + - **P99:** 130 ms + - When called asynchronously in bulk (with a default concurrency of 10 tasks), 1,000 invocations complete in: + - **P50:** 6.21 seconds + - **P90:** 6.50 seconds + - **P99:** 6.64 seconds + - This translates to an average per-call latency of approximately 6 ms, demonstrating strong scalability under load. + +- **`EVMBatchRiskScore`:** This interface is optimized for analyzing large batches of transactions, particularly those from multiple `from` addresses with consecutively increasing nonces. For a batch of 1,000 transactions: + - Request construction time: + - **P50:** 4.1 ms + - **P90:** 5.1 ms + - **P99**: 5.3 ms + - Request processing time: + - **P50:** 306 ms + - **P90:** 349 ms + - **P99**: 390 ms + +### Integration Strategy + +The integration is carefully designed to be non-blocking and to minimize any impact on validator performance. + +1. **Single Transaction Check (`SubmitTransaction`):** The `EVMRiskScore` call is integrated into the `SubmitTransaction` function, which is triggered by `eth_sendRawTransaction`. + + - **Early Mitigation:** Screens transactions before they enter the mempool and propagate to peers. + - **Efficiency:** Geth's native validation (e.g., signature, nonce) runs first, preventing unnecessary calls to GSM. The asynchronous and sporadic nature of user submissions means the ~52 ms P50 latency is imperceptible. + - **Cache Priming:** This initial scan effectively "warms" the GSM cache, accelerating the subsequent batch scan. + +2. **Batch Transaction Check (Promotion to `pending`):** The `EVMBatchRiskScore` call is invoked during the mempool's internal process of promoting `queued` transactions to the `pending` state. + + - **Zero Impact on Block Production:** This promotion process runs asynchronously to block creation. With a sufficiently populated `pending` pool of already-vetted transactions, the block producer is never delayed waiting for GSM analysis. + - **Pre-Processed Data:** The validator node has already sorted transactions by sender and nonce, providing perfectly structured input for GSM's contextual analysis and eliminating redundant data preparation. + - **Comprehensive Screening:** This check acts as a catch-all, analyzing transactions received from peers in addition to those submitted directly. + +## 4. Analysis of Current Limitations and Future Work + +While this architecture provides a transformative security uplift, we identify several areas for future optimization to ensure long-term scalability and robustness. + +#### **Limitation 1: Redundant Cross-Validator Scanning** + +Currently, each of the active validators independently fetches transactions from the network and performs its own batch security analysis. This creates a scenario where the active validator set performs redundant, near-identical `EVMBatchRiskScore` analyses on the same transaction sets, placing a significant and repetitive load on the centralized GSM service. This challenge would be amplified in networks with larger validator sets, such as Ethereum. + +- **Proposed Solution: Decentralized AVS Model:** A long-term solution is to decentralize the security analysis infrastructure itself. By adopting a model akin to EigenLayer's Actively Validated Services (AVS), multiple independent parties could operate GSM nodes. This would distribute the computational load, enhance censorship resistance, and provide the scalability required for larger networks. + +#### **Limitation 2: Large Request Payloads in Batch Mode** + +The `EVMBatchRiskScore` API requires the full raw transaction data for analysis. In periods of high network activity, these batch requests can generate large data payloads, consuming considerable bandwidth between the validator and the GSM server. + +- **Proposed Solution: Hash-Based Pre-Flight Check:** We propose optimizing the API with a two-phase commit process. + 1. The validator sends a list of transaction hashes to GSM. + 2. Leveraging its cache, GSM identifies any hashes it has not seen recently and requests the full transaction data for only that unknown subset. This would dramatically reduce bandwidth consumption, as the vast majority of transactions in a batch will likely already be in GSM's cache. + +#### **Limitation 3: Optionality of Security Checks** + +To guarantee validator uptime and performance, the current design is fault-tolerant: if a GSM request times out (>500 ms) or the service is unavailable, the check is bypassed, and the transaction is deemed safe. This "fail-open" approach, while pragmatic, creates a potential security gap. + +- **Proposed Solution: Hybrid Model with Embedded Core Logic:** The future architecture should evolve towards a hybrid model. While complex, computationally intensive analysis can remain with a remote service, a core set of critical, non-negotiable security rules (e.g., blocking known malicious signatures, preventing re-entrancy patterns) should be embedded directly into the Geth client as a lightweight, local module. This would ensure a baseline level of security is always enforced, eliminating reliance on a remote call for the most essential checks. + +## 5. Conclusion + +The native integration of the GSM service into BSC Geth validators represents a significant evolution in blockchain security architecture. By implementing a performant, two-stage scanning framework, we shift from a reactive, user-dependent security model to a proactive, protocol-enforced defense mechanism. The design is engineered to be minimally invasive to validator performance while providing maximum protection against a wide range of on-chain threats. + +The identified limitations—redundant scanning, payload inefficiency, and fault-tolerant bypasses—are not weaknesses in the core concept but rather clear signposts for future development. By pursuing a roadmap towards decentralization, data efficiency, and embedded core logic, this framework can serve as a robust and scalable security blueprint not only for BSC but for the broader ecosystem of EVM-compatible blockchains. This work lays the foundation for a more secure and resilient decentralized future. \ No newline at end of file diff --git a/README.md b/README.md index 5915fc4548..60a481bc9e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +## BNB Smart Chain with GSM Integration (Proof of Concept) + +This fork implements a proof-of-concept integration of the GoPlus Security Module (GSM) into BSC Geth nodes for proactive transaction security. The integration is based on [BSC v1.5.13](https://github.com/bnb-chain/bsc/releases/tag/v1.5.13) and provides a two-stage security scanning framework: first intercepting transactions at submission to perform quick risk assessment, then conducting batch analysis before transactions enter the pending state in the mempool. This approach helps identify and mitigate malicious transactions before they are committed to blocks, significantly enhancing on-chain security with minimal performance impact. + +For implementation details, please refer to [GSM.md](./GSM.md) in this repository. Note that this is a proof-of-concept implementation with hardcoded configuration in `gsm/risk.go`. If you wish to test the GSM functionality, please contact GoPlus at `service@gopluslabs.io` to obtain the necessary API key and endpoint information. + ## BNB Smart Chain The goal of BNB Smart Chain is to bring programmability and interoperability to BNB Beacon Chain. In order to embrace the existing popular community and advanced technology, it will bring huge benefits by staying compatible with all the existing smart contracts on Ethereum and Ethereum tooling. And to achieve that, the easiest solution is to develop based on go-ethereum fork, as we respect the great work of Ethereum very much. diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index a8d16fb33c..cca949074a 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -37,6 +37,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/gsm" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/params" @@ -103,6 +104,7 @@ var ( queuedRateLimitMeter = metrics.NewRegisteredMeter("txpool/queued/ratelimit", nil) // Dropped due to rate limiting queuedNofundsMeter = metrics.NewRegisteredMeter("txpool/queued/nofunds", nil) // Dropped due to out-of-funds queuedEvictionMeter = metrics.NewRegisteredMeter("txpool/queued/eviction", nil) // Dropped due to lifetime + queuedGSMRiskyMeter = metrics.NewRegisteredMeter("txpool/queued/gsmrisky", nil) // Dropped due to GSM risk assessment // General tx metrics knownTxMeter = metrics.NewRegisteredMeter("txpool/known", nil) @@ -1488,10 +1490,139 @@ func (pool *LegacyPool) reset(oldHead, newHead *types.Header) { pool.addTxsLocked(reinject) } -// promoteExecutables moves transactions that have become processable from the +// Reorganized implementation of promoteExecutables +// The approach splits the accounts processing into three phases, allowing the second phase +// to batch-promote transactions across all accounts rather than processing one account at a time. +// This leverages GSM's batch evaluation capabilities for more effective risk detection. +func (pool *LegacyPool) promoteExecutables(accounts []common.Address) []*types.Transaction { + // Early return if no accounts to process + if len(accounts) == 0 { + return make([]*types.Transaction, 0) + } + + // Track statistics for all transaction classifications + txCounter := struct { + forwards int // Transactions with nonce lower than current state + drops int // Transactions that are unexecutable (insufficient balance/gas) + caps int // Transactions removed due to per-account queue limits + readies int // Transactions ready for execution + riskies int // Transactions flagged as risky by GSM + }{} + + // Temporary map to hold ready transactions for each account + readyMap := make(map[common.Address]types.Transactions, len(accounts)) + + gasLimit := pool.currentHead.Load().GasLimit + + // Phase 1: Process forwards, drops, and identify ready transactions + for _, addr := range accounts { + list := pool.queue[addr] + if list == nil { + continue + } + + // 1. Remove transactions with nonces lower than current state + forwards := list.Forward(pool.currentState.GetNonce(addr)) + for _, tx := range forwards { + pool.all.Remove(tx.Hash()) + } + txCounter.forwards += len(forwards) + + // 2. Remove transactions with insufficient balance or exceeding gas limit + drops, _ := list.Filter(pool.currentState.GetBalance(addr), gasLimit) + for _, tx := range drops { + pool.all.Remove(tx.Hash()) + } + txCounter.drops += len(drops) + + // 3. Identify ready transactions but don't promote them yet + readies := list.Ready(pool.pendingNonces.get(addr)) + if len(readies) > 0 { + // Note: At this point, all Ready transactions have been moved from list to readies + // readyMap excludes accounts with no ready transactions + readyMap[addr] = readies + txCounter.readies += len(readies) + } + } + log.Trace("Removed old queued transactions", "count", int64(txCounter.forwards)) + log.Trace("Removed unpayable queued transactions", "count", int64(txCounter.drops)) + queuedNofundsMeter.Mark(int64(txCounter.drops)) + + // Phase 1.5: Batch evaluate transaction safety with GSM + // This step identifies risky transactions across all accounts in a single batch call, + // which can detect complex risk patterns and relationships between transactions + riskyMap := gsm.GetRiskServiceClient().BatchIsRiskyTx(&readyMap) + for addr, riskyArr := range riskyMap { + readies := readyMap[addr] + for idx, risky := range riskyArr { + if risky { + // Remove transactions flagged as risky + // This implementation assumes risky transactions are rare, so individual removal is acceptable + tx := readies[idx] + txCounter.riskies += 1 + pool.all.Remove(tx.Hash()) + log.Warn("legacypool.promoteExecutables removed risky tx from pool", "FromAddr", addr.Hex(), "tx", tx.Hash()) + } + } + } + queuedGSMRiskyMeter.Mark(int64(txCounter.riskies)) + + // Phase 2: Promote all safe transactions + // Only transactions that passed GSM's risk assessment will be promoted to the pending pool + var promoted []*types.Transaction + for addr, riskyArr := range riskyMap { + for idx, risky := range riskyArr { + if !risky { + tx := readyMap[addr][idx] + hash := tx.Hash() + if pool.promoteTx(addr, hash, tx) { + promoted = append(promoted, tx) + } + } + } + } + log.Trace("Promoted queued transactions", "count", len(promoted)) + // Note: All ready transactions are considered consumed regardless of whether + // they were successfully promoted by pool.promoteTx + queuedGauge.Dec(int64(txCounter.readies)) + + // Phase 3: Apply caps and clean up the pool + for _, addr := range accounts { + list := pool.queue[addr] + if list == nil { + continue + } + // Drop all transactions over the allowed limit + caps := list.Cap(int(pool.config.AccountQueue)) + for _, tx := range caps { + hash := tx.Hash() + pool.all.Remove(hash) + log.Trace("Removed cap-exceeding queued transaction", "hash", hash) + } + txCounter.caps += len(caps) + + // Remove empty queues entirely + if list.Empty() { + delete(pool.queue, addr) + delete(pool.beats, addr) + // Release the account's reserved capacity if it has no pending transactions either + if _, ok := pool.pending[addr]; !ok { + pool.reserve(addr, false) + } + } + } + + queuedRateLimitMeter.Mark(int64(txCounter.caps)) + pool.priced.Removed(txCounter.forwards + txCounter.drops + txCounter.caps) + queuedGauge.Dec(int64(txCounter.forwards + txCounter.drops + txCounter.caps)) + + return promoted +} + +// promoteExecutablesOld (For comparison) moves transactions that have become processable from the // future queue to the set of pending transactions. During this process, all // invalidated transactions (low nonce, low balance) are deleted. -func (pool *LegacyPool) promoteExecutables(accounts []common.Address) []*types.Transaction { +func (pool *LegacyPool) promoteExecutablesOld(accounts []common.Address) []*types.Transaction { // Track the promoted transactions to broadcast them at once var promoted []*types.Transaction diff --git a/go.mod b/go.mod index f0fd59bbad..d964064908 100644 --- a/go.mod +++ b/go.mod @@ -86,7 +86,9 @@ require ( golang.org/x/text v0.23.0 golang.org/x/time v0.5.0 golang.org/x/tools v0.29.0 - google.golang.org/protobuf v1.36.0 + google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a + google.golang.org/grpc v1.72.0 + google.golang.org/protobuf v1.36.5 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v3 v3.0.1 gotest.tools v2.2.0+incompatible @@ -296,13 +298,11 @@ require ( go.uber.org/zap v1.27.0 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/oauth2 v0.26.0 // indirect golang.org/x/term v0.30.0 // indirect google.golang.org/api v0.44.0 // indirect google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/apimachinery v0.20.0 // indirect diff --git a/go.sum b/go.sum index a6071d9cf9..da503538a4 100644 --- a/go.sum +++ b/go.sum @@ -380,6 +380,8 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -425,8 +427,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= +github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1239,6 +1241,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1407,8 +1421,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1711,10 +1725,10 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a h1:nwKuGPlUAt+aR+pcrkfFRrTU1BVrSmYyYMxYbUIVHr0= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.mod h1:3kWAYMk1I75K4vykHtKt2ycnOgpA6974V7bREqbsenU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a h1:51aaUVRocpvUOSQKM6Q7VuoaktNIaMCLuhZB6DKksq4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1741,8 +1755,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1756,8 +1770,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= -google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/gsm/proto/v1/risk_control.pb.go b/gsm/proto/v1/risk_control.pb.go new file mode 100644 index 0000000000..b8be7999d5 --- /dev/null +++ b/gsm/proto/v1/risk_control.pb.go @@ -0,0 +1,2127 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc (unknown) +// source: risk-control/service/v1/risk_control.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/emptypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// BaseResponse is the base response +type BaseResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // google.protobuf.Any result = 3 [json_name = "result"]; +} + +func (x *BaseResponse) Reset() { + *x = BaseResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BaseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BaseResponse) ProtoMessage() {} + +func (x *BaseResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BaseResponse.ProtoReflect.Descriptor instead. +func (*BaseResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{0} +} + +func (x *BaseResponse) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *BaseResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// request data +type RiskScoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + EnableScoring bool `protobuf:"varint,2,opt,name=enable_scoring,json=enableScoring,proto3" json:"enable_scoring,omitempty"` +} + +func (x *RiskScoreRequest) Reset() { + *x = RiskScoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RiskScoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RiskScoreRequest) ProtoMessage() {} + +func (x *RiskScoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RiskScoreRequest.ProtoReflect.Descriptor instead. +func (*RiskScoreRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{1} +} + +func (x *RiskScoreRequest) GetTx() *Tx { + if x != nil { + return x.Tx + } + return nil +} + +func (x *RiskScoreRequest) GetEnableScoring() bool { + if x != nil { + return x.EnableScoring + } + return false +} + +type Tx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + GasPrice string `protobuf:"bytes,5,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + Value string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` + Data string `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + Nonce uint64 `protobuf:"varint,8,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (x *Tx) Reset() { + *x = Tx{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tx) ProtoMessage() {} + +func (x *Tx) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tx.ProtoReflect.Descriptor instead. +func (*Tx) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{2} +} + +func (x *Tx) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *Tx) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *Tx) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Tx) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *Tx) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *Tx) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Tx) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *Tx) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +type RiskScoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Score uint64 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"` + ScoreReason *ScoreReason `protobuf:"bytes,2,opt,name=score_reason,proto3" json:"score_reason,omitempty"` +} + +func (x *RiskScoreResponse) Reset() { + *x = RiskScoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RiskScoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RiskScoreResponse) ProtoMessage() {} + +func (x *RiskScoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RiskScoreResponse.ProtoReflect.Descriptor instead. +func (*RiskScoreResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{3} +} + +func (x *RiskScoreResponse) GetScore() uint64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *RiskScoreResponse) GetScoreReason() *ScoreReason { + if x != nil { + return x.ScoreReason + } + return nil +} + +type ScoreReason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RiskModelScore *RiskModelScore `protobuf:"bytes,1,opt,name=risk_model_score,proto3" json:"risk_model_score,omitempty"` + WhiteAddressCustom bool `protobuf:"varint,2,opt,name=white_address_custom,proto3" json:"white_address_custom,omitempty"` + BlackAddressCustom bool `protobuf:"varint,3,opt,name=black_address_custom,proto3" json:"black_address_custom,omitempty"` + AddressDetect bool `protobuf:"varint,4,opt,name=address_detect,proto3" json:"address_detect,omitempty"` + ApprovalDetect bool `protobuf:"varint,5,opt,name=approval_detect,proto3" json:"approval_detect,omitempty"` + AssetDetect bool `protobuf:"varint,6,opt,name=asset_detect,proto3" json:"asset_detect,omitempty"` +} + +func (x *ScoreReason) Reset() { + *x = ScoreReason{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScoreReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScoreReason) ProtoMessage() {} + +func (x *ScoreReason) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScoreReason.ProtoReflect.Descriptor instead. +func (*ScoreReason) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{4} +} + +func (x *ScoreReason) GetRiskModelScore() *RiskModelScore { + if x != nil { + return x.RiskModelScore + } + return nil +} + +func (x *ScoreReason) GetWhiteAddressCustom() bool { + if x != nil { + return x.WhiteAddressCustom + } + return false +} + +func (x *ScoreReason) GetBlackAddressCustom() bool { + if x != nil { + return x.BlackAddressCustom + } + return false +} + +func (x *ScoreReason) GetAddressDetect() bool { + if x != nil { + return x.AddressDetect + } + return false +} + +func (x *ScoreReason) GetApprovalDetect() bool { + if x != nil { + return x.ApprovalDetect + } + return false +} + +func (x *ScoreReason) GetAssetDetect() bool { + if x != nil { + return x.AssetDetect + } + return false +} + +type RiskModelScore struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FromAddress uint64 `protobuf:"varint,1,opt,name=from_address,proto3" json:"from_address,omitempty"` + ToAddress uint64 `protobuf:"varint,2,opt,name=to_address,proto3" json:"to_address,omitempty"` + CallData uint64 `protobuf:"varint,3,opt,name=call_data,proto3" json:"call_data,omitempty"` + Rug uint64 `protobuf:"varint,4,opt,name=rug,proto3" json:"rug,omitempty"` +} + +func (x *RiskModelScore) Reset() { + *x = RiskModelScore{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RiskModelScore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RiskModelScore) ProtoMessage() {} + +func (x *RiskModelScore) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RiskModelScore.ProtoReflect.Descriptor instead. +func (*RiskModelScore) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{5} +} + +func (x *RiskModelScore) GetFromAddress() uint64 { + if x != nil { + return x.FromAddress + } + return 0 +} + +func (x *RiskModelScore) GetToAddress() uint64 { + if x != nil { + return x.ToAddress + } + return 0 +} + +func (x *RiskModelScore) GetCallData() uint64 { + if x != nil { + return x.CallData + } + return 0 +} + +func (x *RiskModelScore) GetRug() uint64 { + if x != nil { + return x.Rug + } + return 0 +} + +type EVMRiskScoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxObj []byte `protobuf:"bytes,1,opt,name=tx_obj,json=txObj,proto3" json:"tx_obj,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` + EnableScoring bool `protobuf:"varint,4,opt,name=enable_scoring,json=enableScoring,proto3" json:"enable_scoring,omitempty"` +} + +func (x *EVMRiskScoreRequest) Reset() { + *x = EVMRiskScoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EVMRiskScoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EVMRiskScoreRequest) ProtoMessage() {} + +func (x *EVMRiskScoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EVMRiskScoreRequest.ProtoReflect.Descriptor instead. +func (*EVMRiskScoreRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{6} +} + +func (x *EVMRiskScoreRequest) GetTxObj() []byte { + if x != nil { + return x.TxObj + } + return nil +} + +func (x *EVMRiskScoreRequest) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *EVMRiskScoreRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *EVMRiskScoreRequest) GetEnableScoring() bool { + if x != nil { + return x.EnableScoring + } + return false +} + +type RiskScoreBatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxList []*Tx `protobuf:"bytes,1,rep,name=tx_list,json=txList,proto3" json:"tx_list,omitempty"` + EnableScoring bool `protobuf:"varint,2,opt,name=enable_scoring,json=enableScoring,proto3" json:"enable_scoring,omitempty"` +} + +func (x *RiskScoreBatchRequest) Reset() { + *x = RiskScoreBatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RiskScoreBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RiskScoreBatchRequest) ProtoMessage() {} + +func (x *RiskScoreBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RiskScoreBatchRequest.ProtoReflect.Descriptor instead. +func (*RiskScoreBatchRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{7} +} + +func (x *RiskScoreBatchRequest) GetTxList() []*Tx { + if x != nil { + return x.TxList + } + return nil +} + +func (x *RiskScoreBatchRequest) GetEnableScoring() bool { + if x != nil { + return x.EnableScoring + } + return false +} + +type RiskScoreBatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ScoreList []*RiskScoreResponse `protobuf:"bytes,1,rep,name=score_list,proto3" json:"score_list,omitempty"` +} + +func (x *RiskScoreBatchResponse) Reset() { + *x = RiskScoreBatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RiskScoreBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RiskScoreBatchResponse) ProtoMessage() {} + +func (x *RiskScoreBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RiskScoreBatchResponse.ProtoReflect.Descriptor instead. +func (*RiskScoreBatchResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{8} +} + +func (x *RiskScoreBatchResponse) GetScoreList() []*RiskScoreResponse { + if x != nil { + return x.ScoreList + } + return nil +} + +type BNBRiskScoreBatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxMap map[string]*TxList `protobuf:"bytes,1,rep,name=tx_map,json=txMap,proto3" json:"tx_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + EnableScoring bool `protobuf:"varint,2,opt,name=enable_scoring,json=enableScoring,proto3" json:"enable_scoring,omitempty"` +} + +func (x *BNBRiskScoreBatchRequest) Reset() { + *x = BNBRiskScoreBatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BNBRiskScoreBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BNBRiskScoreBatchRequest) ProtoMessage() {} + +func (x *BNBRiskScoreBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BNBRiskScoreBatchRequest.ProtoReflect.Descriptor instead. +func (*BNBRiskScoreBatchRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{9} +} + +func (x *BNBRiskScoreBatchRequest) GetTxMap() map[string]*TxList { + if x != nil { + return x.TxMap + } + return nil +} + +func (x *BNBRiskScoreBatchRequest) GetEnableScoring() bool { + if x != nil { + return x.EnableScoring + } + return false +} + +type TxList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Tx `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *TxList) Reset() { + *x = TxList{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxList) ProtoMessage() {} + +func (x *TxList) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxList.ProtoReflect.Descriptor instead. +func (*TxList) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{10} +} + +func (x *TxList) GetItems() []*Tx { + if x != nil { + return x.Items + } + return nil +} + +type BNBRiskScoreBatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ScoreList map[string]*ScoreReasonList `protobuf:"bytes,1,rep,name=score_list,proto3" json:"score_list,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *BNBRiskScoreBatchResponse) Reset() { + *x = BNBRiskScoreBatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BNBRiskScoreBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BNBRiskScoreBatchResponse) ProtoMessage() {} + +func (x *BNBRiskScoreBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BNBRiskScoreBatchResponse.ProtoReflect.Descriptor instead. +func (*BNBRiskScoreBatchResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{11} +} + +func (x *BNBRiskScoreBatchResponse) GetScoreList() map[string]*ScoreReasonList { + if x != nil { + return x.ScoreList + } + return nil +} + +type ScoreReasonList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ScoreReasonList []*RiskScoreResponse `protobuf:"bytes,1,rep,name=score_reason_list,proto3" json:"score_reason_list,omitempty"` +} + +func (x *ScoreReasonList) Reset() { + *x = ScoreReasonList{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScoreReasonList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScoreReasonList) ProtoMessage() {} + +func (x *ScoreReasonList) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScoreReasonList.ProtoReflect.Descriptor instead. +func (*ScoreReasonList) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{12} +} + +func (x *ScoreReasonList) GetScoreReasonList() []*RiskScoreResponse { + if x != nil { + return x.ScoreReasonList + } + return nil +} + +type EVMBatchRiskScoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FromMap map[string]*TxObjList `protobuf:"bytes,1,rep,name=from_map,json=fromMap,proto3" json:"from_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + EnableScoring bool `protobuf:"varint,3,opt,name=enable_scoring,json=enableScoring,proto3" json:"enable_scoring,omitempty"` +} + +func (x *EVMBatchRiskScoreRequest) Reset() { + *x = EVMBatchRiskScoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EVMBatchRiskScoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EVMBatchRiskScoreRequest) ProtoMessage() {} + +func (x *EVMBatchRiskScoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EVMBatchRiskScoreRequest.ProtoReflect.Descriptor instead. +func (*EVMBatchRiskScoreRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{13} +} + +func (x *EVMBatchRiskScoreRequest) GetFromMap() map[string]*TxObjList { + if x != nil { + return x.FromMap + } + return nil +} + +func (x *EVMBatchRiskScoreRequest) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *EVMBatchRiskScoreRequest) GetEnableScoring() bool { + if x != nil { + return x.EnableScoring + } + return false +} + +type TxObjList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items [][]byte `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *TxObjList) Reset() { + *x = TxObjList{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxObjList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxObjList) ProtoMessage() {} + +func (x *TxObjList) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxObjList.ProtoReflect.Descriptor instead. +func (*TxObjList) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{14} +} + +func (x *TxObjList) GetItems() [][]byte { + if x != nil { + return x.Items + } + return nil +} + +type EVMBatchRiskScoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FromMap map[string]*ScoreReasonList `protobuf:"bytes,1,rep,name=from_map,proto3" json:"from_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *EVMBatchRiskScoreResponse) Reset() { + *x = EVMBatchRiskScoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EVMBatchRiskScoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EVMBatchRiskScoreResponse) ProtoMessage() {} + +func (x *EVMBatchRiskScoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EVMBatchRiskScoreResponse.ProtoReflect.Descriptor instead. +func (*EVMBatchRiskScoreResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{15} +} + +func (x *EVMBatchRiskScoreResponse) GetFromMap() map[string]*ScoreReasonList { + if x != nil { + return x.FromMap + } + return nil +} + +type UserConfigServiceUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` + ApprovalDetect *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=approval_detect,proto3" json:"approval_detect,omitempty"` + AddressDetect *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=address_detect,proto3" json:"address_detect,omitempty"` + AssetDetect *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=asset_detect,proto3" json:"asset_detect,omitempty"` + RiskScoreModel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=risk_score_model,proto3" json:"risk_score_model,omitempty"` + RiskScoreThreshold *wrapperspb.Int32Value `protobuf:"bytes,6,opt,name=risk_score_threshold,proto3" json:"risk_score_threshold,omitempty"` +} + +func (x *UserConfigServiceUpdateRequest) Reset() { + *x = UserConfigServiceUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserConfigServiceUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserConfigServiceUpdateRequest) ProtoMessage() {} + +func (x *UserConfigServiceUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserConfigServiceUpdateRequest.ProtoReflect.Descriptor instead. +func (*UserConfigServiceUpdateRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{16} +} + +func (x *UserConfigServiceUpdateRequest) GetUserAddress() string { + if x != nil { + return x.UserAddress + } + return "" +} + +func (x *UserConfigServiceUpdateRequest) GetApprovalDetect() *wrapperspb.Int32Value { + if x != nil { + return x.ApprovalDetect + } + return nil +} + +func (x *UserConfigServiceUpdateRequest) GetAddressDetect() *wrapperspb.Int32Value { + if x != nil { + return x.AddressDetect + } + return nil +} + +func (x *UserConfigServiceUpdateRequest) GetAssetDetect() *wrapperspb.Int32Value { + if x != nil { + return x.AssetDetect + } + return nil +} + +func (x *UserConfigServiceUpdateRequest) GetRiskScoreModel() *wrapperspb.Int32Value { + if x != nil { + return x.RiskScoreModel + } + return nil +} + +func (x *UserConfigServiceUpdateRequest) GetRiskScoreThreshold() *wrapperspb.Int32Value { + if x != nil { + return x.RiskScoreThreshold + } + return nil +} + +type EmptyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResponse) Reset() { + *x = EmptyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResponse) ProtoMessage() {} + +func (x *EmptyResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead. +func (*EmptyResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{17} +} + +type UserConfigServiceGetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` +} + +func (x *UserConfigServiceGetRequest) Reset() { + *x = UserConfigServiceGetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserConfigServiceGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserConfigServiceGetRequest) ProtoMessage() {} + +func (x *UserConfigServiceGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserConfigServiceGetRequest.ProtoReflect.Descriptor instead. +func (*UserConfigServiceGetRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{18} +} + +func (x *UserConfigServiceGetRequest) GetUserAddress() string { + if x != nil { + return x.UserAddress + } + return "" +} + +type UserConfigServiceGetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` + ApprovalDetect int32 `protobuf:"varint,2,opt,name=approval_detect,json=approvalDetect,proto3" json:"approval_detect,omitempty"` + AddressDetect int32 `protobuf:"varint,3,opt,name=address_detect,json=addressDetect,proto3" json:"address_detect,omitempty"` + AssetDetect int32 `protobuf:"varint,4,opt,name=asset_detect,json=assetDetect,proto3" json:"asset_detect,omitempty"` + RiskScoreModel int32 `protobuf:"varint,5,opt,name=risk_score_model,json=riskScoreModel,proto3" json:"risk_score_model,omitempty"` + RiskScoreThreshold int32 `protobuf:"varint,6,opt,name=risk_score_threshold,json=riskScoreThreshold,proto3" json:"risk_score_threshold,omitempty"` +} + +func (x *UserConfigServiceGetResponse) Reset() { + *x = UserConfigServiceGetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserConfigServiceGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserConfigServiceGetResponse) ProtoMessage() {} + +func (x *UserConfigServiceGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserConfigServiceGetResponse.ProtoReflect.Descriptor instead. +func (*UserConfigServiceGetResponse) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{19} +} + +func (x *UserConfigServiceGetResponse) GetUserAddress() string { + if x != nil { + return x.UserAddress + } + return "" +} + +func (x *UserConfigServiceGetResponse) GetApprovalDetect() int32 { + if x != nil { + return x.ApprovalDetect + } + return 0 +} + +func (x *UserConfigServiceGetResponse) GetAddressDetect() int32 { + if x != nil { + return x.AddressDetect + } + return 0 +} + +func (x *UserConfigServiceGetResponse) GetAssetDetect() int32 { + if x != nil { + return x.AssetDetect + } + return 0 +} + +func (x *UserConfigServiceGetResponse) GetRiskScoreModel() int32 { + if x != nil { + return x.RiskScoreModel + } + return 0 +} + +func (x *UserConfigServiceGetResponse) GetRiskScoreThreshold() int32 { + if x != nil { + return x.RiskScoreThreshold + } + return 0 +} + +type UserConfigServiceUpdateWLBLRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` + TargetAddress string `protobuf:"bytes,2,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Remark string `protobuf:"bytes,4,opt,name=remark,proto3" json:"remark,omitempty"` +} + +func (x *UserConfigServiceUpdateWLBLRequest) Reset() { + *x = UserConfigServiceUpdateWLBLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserConfigServiceUpdateWLBLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserConfigServiceUpdateWLBLRequest) ProtoMessage() {} + +func (x *UserConfigServiceUpdateWLBLRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserConfigServiceUpdateWLBLRequest.ProtoReflect.Descriptor instead. +func (*UserConfigServiceUpdateWLBLRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{20} +} + +func (x *UserConfigServiceUpdateWLBLRequest) GetUserAddress() string { + if x != nil { + return x.UserAddress + } + return "" +} + +func (x *UserConfigServiceUpdateWLBLRequest) GetTargetAddress() string { + if x != nil { + return x.TargetAddress + } + return "" +} + +func (x *UserConfigServiceUpdateWLBLRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *UserConfigServiceUpdateWLBLRequest) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +type UserConfigServiceDeleteWLBLRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` + TargetAddress string `protobuf:"bytes,2,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *UserConfigServiceDeleteWLBLRequest) Reset() { + *x = UserConfigServiceDeleteWLBLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserConfigServiceDeleteWLBLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserConfigServiceDeleteWLBLRequest) ProtoMessage() {} + +func (x *UserConfigServiceDeleteWLBLRequest) ProtoReflect() protoreflect.Message { + mi := &file_risk_control_service_v1_risk_control_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserConfigServiceDeleteWLBLRequest.ProtoReflect.Descriptor instead. +func (*UserConfigServiceDeleteWLBLRequest) Descriptor() ([]byte, []int) { + return file_risk_control_service_v1_risk_control_proto_rawDescGZIP(), []int{21} +} + +func (x *UserConfigServiceDeleteWLBLRequest) GetUserAddress() string { + if x != nil { + return x.UserAddress + } + return "" +} + +func (x *UserConfigServiceDeleteWLBLRequest) GetTargetAddress() string { + if x != nil { + return x.TargetAddress + } + return "" +} + +func (x *UserConfigServiceDeleteWLBLRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +var File_risk_control_service_v1_risk_control_proto protoreflect.FileDescriptor + +var file_risk_control_service_v1_risk_control_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x72, 0x69, 0x73, 0x6b, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x69, + 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, + 0x0c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x66, 0x0a, 0x10, 0x52, + 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x69, + 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x02, 0x74, 0x78, 0x12, 0x25, 0x0a, 0x0e, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x22, 0xf1, 0x02, 0x0a, 0x02, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x08, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, + 0x09, 0x72, 0x07, 0x52, 0x01, 0x31, 0x52, 0x02, 0x35, 0x36, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x66, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x52, 0xba, 0x48, 0x4f, 0xba, 0x01, 0x4c, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, + 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, + 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x60, 0x0a, 0x02, 0x74, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x50, 0xba, 0x48, 0x4d, 0xba, 0x01, 0x4a, 0x0a, + 0x02, 0x74, 0x6f, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, + 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, + 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x11, 0x52, 0x69, 0x73, 0x6b, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x48, 0x0a, 0x0c, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xc0, 0x02, 0x0a, + 0x0b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x10, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, + 0x10, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x12, 0x32, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x14, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x14, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x22, + 0x84, 0x01, 0x0a, 0x0e, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x75, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x03, 0x72, 0x75, 0x67, 0x22, 0xe6, 0x01, 0x0a, 0x13, 0x45, 0x56, 0x4d, 0x52, 0x69, + 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x74, 0x78, 0x5f, 0x6f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x74, 0x78, 0x4f, 0x62, 0x6a, 0x12, 0x29, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x72, 0x09, 0x52, 0x00, + 0x52, 0x01, 0x31, 0x52, 0x02, 0x35, 0x36, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x66, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x52, + 0xba, 0x48, 0x4f, 0xba, 0x01, 0x4c, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x21, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, + 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, + 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, + 0x27, 0x29, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x22, + 0x7e, 0x0a, 0x15, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x69, 0x73, 0x6b, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x06, 0x74, 0x78, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x22, + 0x64, 0x0a, 0x16, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xf1, 0x01, 0x0a, 0x18, 0x42, 0x4e, 0x42, 0x52, 0x69, 0x73, + 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x53, 0x0a, 0x06, 0x74, 0x78, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x4e, 0x42, + 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x78, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x74, 0x78, 0x4d, 0x61, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x59, + 0x0a, 0x0a, 0x54, 0x78, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x35, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3b, 0x0a, 0x06, 0x54, 0x78, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x19, 0x42, 0x4e, 0x42, 0x52, 0x69, + 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x4e, 0x42, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x66, 0x0a, 0x0e, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x6b, 0x0a, 0x0f, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x58, 0x0a, 0x11, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xb1, 0x02, 0x0a, + 0x18, 0x45, 0x56, 0x4d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x08, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x72, 0x69, + 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x56, 0x4d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x69, + 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, + 0x72, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x12, 0x29, + 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x72, 0x09, 0x52, 0x00, 0x52, 0x01, 0x31, 0x52, 0x02, 0x35, 0x36, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, + 0x1a, 0x5e, 0x0a, 0x0c, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x4f, 0x62, + 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x21, 0x0a, 0x09, 0x54, 0x78, 0x4f, 0x62, 0x6a, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x19, 0x45, 0x56, 0x4d, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5b, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x56, + 0x4d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x70, 0x1a, 0x64, + 0x0a, 0x0c, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbd, 0x04, 0x0a, 0x1e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5a, 0xba, + 0x48, 0x57, 0xba, 0x01, 0x54, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, + 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xba, 0x48, + 0x06, 0x1a, 0x04, 0x30, 0x00, 0x30, 0x01, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, + 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x12, 0x4e, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xba, + 0x48, 0x06, 0x1a, 0x04, 0x30, 0x00, 0x30, 0x01, 0x52, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x12, 0x4a, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xba, 0x48, 0x06, + 0x1a, 0x04, 0x30, 0x00, 0x30, 0x01, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x12, 0x52, 0x0a, 0x10, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xba, 0x48, 0x06, + 0x1a, 0x04, 0x30, 0x00, 0x30, 0x01, 0x52, 0x10, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x5a, 0x0a, 0x14, 0x72, 0x69, 0x73, 0x6b, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x09, 0xba, 0x48, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x00, 0x52, 0x14, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x1b, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5a, 0xba, 0x48, 0x57, + 0xba, 0x01, 0x54, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, + 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x90, 0x02, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, + 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xd5, 0x02, 0x0a, 0x22, 0x55, 0x73, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x57, 0x4c, 0x42, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7d, + 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x5a, 0xba, 0x48, 0x57, 0xba, 0x01, 0x54, 0x0a, 0x0c, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, + 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, + 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x83, 0x01, + 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5c, 0xba, 0x48, 0x59, 0xba, 0x01, 0x56, 0x0a, 0x0e, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, + 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, + 0x30, 0x7d, 0x27, 0x29, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x22, + 0xbd, 0x02, 0x0a, 0x22, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x4c, 0x42, 0x4c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5a, 0xba, 0x48, + 0x57, 0xba, 0x01, 0x54, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x20, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, + 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5c, + 0xba, 0x48, 0x59, 0xba, 0x01, 0x56, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x1a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x30, 0x78, 0x5b, 0x30, 0x2d, 0x39, 0x61, + 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x30, 0x7d, 0x27, 0x29, 0x52, 0x0d, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, + 0xa4, 0x04, 0x0a, 0x0b, 0x52, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, + 0x89, 0x01, 0x0a, 0x09, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x2e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, + 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x72, 0x69, 0x73, 0x6b, 0x2d, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0e, + 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2e, + 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x72, 0x69, 0x73, 0x6b, 0x2d, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x6a, 0x0a, 0x0c, + 0x45, 0x56, 0x4d, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2c, 0x2e, 0x72, + 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x56, 0x4d, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x11, 0x45, 0x56, 0x4d, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x31, 0x2e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x56, 0x4d, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x56, 0x4d, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x69, 0x73, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xa6, 0x05, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, 0x01, 0x0a, + 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x37, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x34, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x72, 0x69, 0x73, 0x6b, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12, 0xb6, 0x01, + 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x3b, 0x2e, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x4c, 0x42, 0x4c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x6c, 0x61, + 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x12, 0xb6, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x6c, + 0x69, 0x73, 0x74, 0x12, 0x3b, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x4c, 0x42, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, + 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2f, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x42, + 0x46, 0x0a, 0x1b, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x50, 0x01, + 0x5a, 0x25, 0x67, 0x6f, 0x70, 0x6c, 0x75, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_risk_control_service_v1_risk_control_proto_rawDescOnce sync.Once + file_risk_control_service_v1_risk_control_proto_rawDescData = file_risk_control_service_v1_risk_control_proto_rawDesc +) + +func file_risk_control_service_v1_risk_control_proto_rawDescGZIP() []byte { + file_risk_control_service_v1_risk_control_proto_rawDescOnce.Do(func() { + file_risk_control_service_v1_risk_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_risk_control_service_v1_risk_control_proto_rawDescData) + }) + return file_risk_control_service_v1_risk_control_proto_rawDescData +} + +var file_risk_control_service_v1_risk_control_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_risk_control_service_v1_risk_control_proto_goTypes = []interface{}{ + (*BaseResponse)(nil), // 0: risk_control.service.v1.BaseResponse + (*RiskScoreRequest)(nil), // 1: risk_control.service.v1.RiskScoreRequest + (*Tx)(nil), // 2: risk_control.service.v1.Tx + (*RiskScoreResponse)(nil), // 3: risk_control.service.v1.RiskScoreResponse + (*ScoreReason)(nil), // 4: risk_control.service.v1.ScoreReason + (*RiskModelScore)(nil), // 5: risk_control.service.v1.RiskModelScore + (*EVMRiskScoreRequest)(nil), // 6: risk_control.service.v1.EVMRiskScoreRequest + (*RiskScoreBatchRequest)(nil), // 7: risk_control.service.v1.RiskScoreBatchRequest + (*RiskScoreBatchResponse)(nil), // 8: risk_control.service.v1.RiskScoreBatchResponse + (*BNBRiskScoreBatchRequest)(nil), // 9: risk_control.service.v1.BNBRiskScoreBatchRequest + (*TxList)(nil), // 10: risk_control.service.v1.TxList + (*BNBRiskScoreBatchResponse)(nil), // 11: risk_control.service.v1.BNBRiskScoreBatchResponse + (*ScoreReasonList)(nil), // 12: risk_control.service.v1.ScoreReasonList + (*EVMBatchRiskScoreRequest)(nil), // 13: risk_control.service.v1.EVMBatchRiskScoreRequest + (*TxObjList)(nil), // 14: risk_control.service.v1.TxObjList + (*EVMBatchRiskScoreResponse)(nil), // 15: risk_control.service.v1.EVMBatchRiskScoreResponse + (*UserConfigServiceUpdateRequest)(nil), // 16: risk_control.service.v1.UserConfigServiceUpdateRequest + (*EmptyResponse)(nil), // 17: risk_control.service.v1.EmptyResponse + (*UserConfigServiceGetRequest)(nil), // 18: risk_control.service.v1.UserConfigServiceGetRequest + (*UserConfigServiceGetResponse)(nil), // 19: risk_control.service.v1.UserConfigServiceGetResponse + (*UserConfigServiceUpdateWLBLRequest)(nil), // 20: risk_control.service.v1.UserConfigServiceUpdateWLBLRequest + (*UserConfigServiceDeleteWLBLRequest)(nil), // 21: risk_control.service.v1.UserConfigServiceDeleteWLBLRequest + nil, // 22: risk_control.service.v1.BNBRiskScoreBatchRequest.TxMapEntry + nil, // 23: risk_control.service.v1.BNBRiskScoreBatchResponse.ScoreListEntry + nil, // 24: risk_control.service.v1.EVMBatchRiskScoreRequest.FromMapEntry + nil, // 25: risk_control.service.v1.EVMBatchRiskScoreResponse.FromMapEntry + (*wrapperspb.Int32Value)(nil), // 26: google.protobuf.Int32Value +} +var file_risk_control_service_v1_risk_control_proto_depIdxs = []int32{ + 2, // 0: risk_control.service.v1.RiskScoreRequest.tx:type_name -> risk_control.service.v1.Tx + 4, // 1: risk_control.service.v1.RiskScoreResponse.score_reason:type_name -> risk_control.service.v1.ScoreReason + 5, // 2: risk_control.service.v1.ScoreReason.risk_model_score:type_name -> risk_control.service.v1.RiskModelScore + 2, // 3: risk_control.service.v1.RiskScoreBatchRequest.tx_list:type_name -> risk_control.service.v1.Tx + 3, // 4: risk_control.service.v1.RiskScoreBatchResponse.score_list:type_name -> risk_control.service.v1.RiskScoreResponse + 22, // 5: risk_control.service.v1.BNBRiskScoreBatchRequest.tx_map:type_name -> risk_control.service.v1.BNBRiskScoreBatchRequest.TxMapEntry + 2, // 6: risk_control.service.v1.TxList.items:type_name -> risk_control.service.v1.Tx + 23, // 7: risk_control.service.v1.BNBRiskScoreBatchResponse.score_list:type_name -> risk_control.service.v1.BNBRiskScoreBatchResponse.ScoreListEntry + 3, // 8: risk_control.service.v1.ScoreReasonList.score_reason_list:type_name -> risk_control.service.v1.RiskScoreResponse + 24, // 9: risk_control.service.v1.EVMBatchRiskScoreRequest.from_map:type_name -> risk_control.service.v1.EVMBatchRiskScoreRequest.FromMapEntry + 25, // 10: risk_control.service.v1.EVMBatchRiskScoreResponse.from_map:type_name -> risk_control.service.v1.EVMBatchRiskScoreResponse.FromMapEntry + 26, // 11: risk_control.service.v1.UserConfigServiceUpdateRequest.approval_detect:type_name -> google.protobuf.Int32Value + 26, // 12: risk_control.service.v1.UserConfigServiceUpdateRequest.address_detect:type_name -> google.protobuf.Int32Value + 26, // 13: risk_control.service.v1.UserConfigServiceUpdateRequest.asset_detect:type_name -> google.protobuf.Int32Value + 26, // 14: risk_control.service.v1.UserConfigServiceUpdateRequest.risk_score_model:type_name -> google.protobuf.Int32Value + 26, // 15: risk_control.service.v1.UserConfigServiceUpdateRequest.risk_score_threshold:type_name -> google.protobuf.Int32Value + 10, // 16: risk_control.service.v1.BNBRiskScoreBatchRequest.TxMapEntry.value:type_name -> risk_control.service.v1.TxList + 12, // 17: risk_control.service.v1.BNBRiskScoreBatchResponse.ScoreListEntry.value:type_name -> risk_control.service.v1.ScoreReasonList + 14, // 18: risk_control.service.v1.EVMBatchRiskScoreRequest.FromMapEntry.value:type_name -> risk_control.service.v1.TxObjList + 12, // 19: risk_control.service.v1.EVMBatchRiskScoreResponse.FromMapEntry.value:type_name -> risk_control.service.v1.ScoreReasonList + 1, // 20: risk_control.service.v1.RiskControl.RiskScore:input_type -> risk_control.service.v1.RiskScoreRequest + 7, // 21: risk_control.service.v1.RiskControl.RiskScoreBatch:input_type -> risk_control.service.v1.RiskScoreBatchRequest + 6, // 22: risk_control.service.v1.RiskControl.EVMRiskScore:input_type -> risk_control.service.v1.EVMRiskScoreRequest + 13, // 23: risk_control.service.v1.RiskControl.EVMBatchRiskScore:input_type -> risk_control.service.v1.EVMBatchRiskScoreRequest + 16, // 24: risk_control.service.v1.UserConfigService.Update:input_type -> risk_control.service.v1.UserConfigServiceUpdateRequest + 18, // 25: risk_control.service.v1.UserConfigService.Get:input_type -> risk_control.service.v1.UserConfigServiceGetRequest + 20, // 26: risk_control.service.v1.UserConfigService.UpdateWhitelistBlacklist:input_type -> risk_control.service.v1.UserConfigServiceUpdateWLBLRequest + 21, // 27: risk_control.service.v1.UserConfigService.DeleteWhitelistBlacklist:input_type -> risk_control.service.v1.UserConfigServiceDeleteWLBLRequest + 3, // 28: risk_control.service.v1.RiskControl.RiskScore:output_type -> risk_control.service.v1.RiskScoreResponse + 8, // 29: risk_control.service.v1.RiskControl.RiskScoreBatch:output_type -> risk_control.service.v1.RiskScoreBatchResponse + 3, // 30: risk_control.service.v1.RiskControl.EVMRiskScore:output_type -> risk_control.service.v1.RiskScoreResponse + 15, // 31: risk_control.service.v1.RiskControl.EVMBatchRiskScore:output_type -> risk_control.service.v1.EVMBatchRiskScoreResponse + 17, // 32: risk_control.service.v1.UserConfigService.Update:output_type -> risk_control.service.v1.EmptyResponse + 19, // 33: risk_control.service.v1.UserConfigService.Get:output_type -> risk_control.service.v1.UserConfigServiceGetResponse + 17, // 34: risk_control.service.v1.UserConfigService.UpdateWhitelistBlacklist:output_type -> risk_control.service.v1.EmptyResponse + 17, // 35: risk_control.service.v1.UserConfigService.DeleteWhitelistBlacklist:output_type -> risk_control.service.v1.EmptyResponse + 28, // [28:36] is the sub-list for method output_type + 20, // [20:28] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_risk_control_service_v1_risk_control_proto_init() } +func file_risk_control_service_v1_risk_control_proto_init() { + if File_risk_control_service_v1_risk_control_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_risk_control_service_v1_risk_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BaseResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RiskScoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RiskScoreResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScoreReason); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RiskModelScore); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EVMRiskScoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RiskScoreBatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RiskScoreBatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BNBRiskScoreBatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BNBRiskScoreBatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScoreReasonList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EVMBatchRiskScoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxObjList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EVMBatchRiskScoreResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserConfigServiceUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserConfigServiceGetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserConfigServiceGetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserConfigServiceUpdateWLBLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_risk_control_service_v1_risk_control_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserConfigServiceDeleteWLBLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_risk_control_service_v1_risk_control_proto_rawDesc, + NumEnums: 0, + NumMessages: 26, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_risk_control_service_v1_risk_control_proto_goTypes, + DependencyIndexes: file_risk_control_service_v1_risk_control_proto_depIdxs, + MessageInfos: file_risk_control_service_v1_risk_control_proto_msgTypes, + }.Build() + File_risk_control_service_v1_risk_control_proto = out.File + file_risk_control_service_v1_risk_control_proto_rawDesc = nil + file_risk_control_service_v1_risk_control_proto_goTypes = nil + file_risk_control_service_v1_risk_control_proto_depIdxs = nil +} diff --git a/gsm/proto/v1/risk_control_grpc.pb.go b/gsm/proto/v1/risk_control_grpc.pb.go new file mode 100644 index 0000000000..d827137719 --- /dev/null +++ b/gsm/proto/v1/risk_control_grpc.pb.go @@ -0,0 +1,421 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: risk-control/service/v1/risk_control.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + RiskControl_RiskScore_FullMethodName = "/risk_control.service.v1.RiskControl/RiskScore" + RiskControl_RiskScoreBatch_FullMethodName = "/risk_control.service.v1.RiskControl/RiskScoreBatch" + RiskControl_EVMRiskScore_FullMethodName = "/risk_control.service.v1.RiskControl/EVMRiskScore" + RiskControl_EVMBatchRiskScore_FullMethodName = "/risk_control.service.v1.RiskControl/EVMBatchRiskScore" +) + +// RiskControlClient is the client API for RiskControl service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RiskControlClient interface { + RiskScore(ctx context.Context, in *RiskScoreRequest, opts ...grpc.CallOption) (*RiskScoreResponse, error) + RiskScoreBatch(ctx context.Context, in *RiskScoreBatchRequest, opts ...grpc.CallOption) (*RiskScoreBatchResponse, error) + EVMRiskScore(ctx context.Context, in *EVMRiskScoreRequest, opts ...grpc.CallOption) (*RiskScoreResponse, error) + EVMBatchRiskScore(ctx context.Context, in *EVMBatchRiskScoreRequest, opts ...grpc.CallOption) (*EVMBatchRiskScoreResponse, error) +} + +type riskControlClient struct { + cc grpc.ClientConnInterface +} + +func NewRiskControlClient(cc grpc.ClientConnInterface) RiskControlClient { + return &riskControlClient{cc} +} + +func (c *riskControlClient) RiskScore(ctx context.Context, in *RiskScoreRequest, opts ...grpc.CallOption) (*RiskScoreResponse, error) { + out := new(RiskScoreResponse) + err := c.cc.Invoke(ctx, RiskControl_RiskScore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *riskControlClient) RiskScoreBatch(ctx context.Context, in *RiskScoreBatchRequest, opts ...grpc.CallOption) (*RiskScoreBatchResponse, error) { + out := new(RiskScoreBatchResponse) + err := c.cc.Invoke(ctx, RiskControl_RiskScoreBatch_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *riskControlClient) EVMRiskScore(ctx context.Context, in *EVMRiskScoreRequest, opts ...grpc.CallOption) (*RiskScoreResponse, error) { + out := new(RiskScoreResponse) + err := c.cc.Invoke(ctx, RiskControl_EVMRiskScore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *riskControlClient) EVMBatchRiskScore(ctx context.Context, in *EVMBatchRiskScoreRequest, opts ...grpc.CallOption) (*EVMBatchRiskScoreResponse, error) { + out := new(EVMBatchRiskScoreResponse) + err := c.cc.Invoke(ctx, RiskControl_EVMBatchRiskScore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RiskControlServer is the server API for RiskControl service. +// All implementations must embed UnimplementedRiskControlServer +// for forward compatibility +type RiskControlServer interface { + RiskScore(context.Context, *RiskScoreRequest) (*RiskScoreResponse, error) + RiskScoreBatch(context.Context, *RiskScoreBatchRequest) (*RiskScoreBatchResponse, error) + EVMRiskScore(context.Context, *EVMRiskScoreRequest) (*RiskScoreResponse, error) + EVMBatchRiskScore(context.Context, *EVMBatchRiskScoreRequest) (*EVMBatchRiskScoreResponse, error) + mustEmbedUnimplementedRiskControlServer() +} + +// UnimplementedRiskControlServer must be embedded to have forward compatible implementations. +type UnimplementedRiskControlServer struct { +} + +func (UnimplementedRiskControlServer) RiskScore(context.Context, *RiskScoreRequest) (*RiskScoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RiskScore not implemented") +} +func (UnimplementedRiskControlServer) RiskScoreBatch(context.Context, *RiskScoreBatchRequest) (*RiskScoreBatchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RiskScoreBatch not implemented") +} +func (UnimplementedRiskControlServer) EVMRiskScore(context.Context, *EVMRiskScoreRequest) (*RiskScoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EVMRiskScore not implemented") +} +func (UnimplementedRiskControlServer) EVMBatchRiskScore(context.Context, *EVMBatchRiskScoreRequest) (*EVMBatchRiskScoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EVMBatchRiskScore not implemented") +} +func (UnimplementedRiskControlServer) mustEmbedUnimplementedRiskControlServer() {} + +// UnsafeRiskControlServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RiskControlServer will +// result in compilation errors. +type UnsafeRiskControlServer interface { + mustEmbedUnimplementedRiskControlServer() +} + +func RegisterRiskControlServer(s grpc.ServiceRegistrar, srv RiskControlServer) { + s.RegisterService(&RiskControl_ServiceDesc, srv) +} + +func _RiskControl_RiskScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RiskScoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RiskControlServer).RiskScore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RiskControl_RiskScore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RiskControlServer).RiskScore(ctx, req.(*RiskScoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RiskControl_RiskScoreBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RiskScoreBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RiskControlServer).RiskScoreBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RiskControl_RiskScoreBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RiskControlServer).RiskScoreBatch(ctx, req.(*RiskScoreBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RiskControl_EVMRiskScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EVMRiskScoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RiskControlServer).EVMRiskScore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RiskControl_EVMRiskScore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RiskControlServer).EVMRiskScore(ctx, req.(*EVMRiskScoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RiskControl_EVMBatchRiskScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EVMBatchRiskScoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RiskControlServer).EVMBatchRiskScore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RiskControl_EVMBatchRiskScore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RiskControlServer).EVMBatchRiskScore(ctx, req.(*EVMBatchRiskScoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RiskControl_ServiceDesc is the grpc.ServiceDesc for RiskControl service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RiskControl_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "risk_control.service.v1.RiskControl", + HandlerType: (*RiskControlServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RiskScore", + Handler: _RiskControl_RiskScore_Handler, + }, + { + MethodName: "RiskScoreBatch", + Handler: _RiskControl_RiskScoreBatch_Handler, + }, + { + MethodName: "EVMRiskScore", + Handler: _RiskControl_EVMRiskScore_Handler, + }, + { + MethodName: "EVMBatchRiskScore", + Handler: _RiskControl_EVMBatchRiskScore_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "risk-control/service/v1/risk_control.proto", +} + +const ( + UserConfigService_Update_FullMethodName = "/risk_control.service.v1.UserConfigService/Update" + UserConfigService_Get_FullMethodName = "/risk_control.service.v1.UserConfigService/Get" + UserConfigService_UpdateWhitelistBlacklist_FullMethodName = "/risk_control.service.v1.UserConfigService/UpdateWhitelistBlacklist" + UserConfigService_DeleteWhitelistBlacklist_FullMethodName = "/risk_control.service.v1.UserConfigService/DeleteWhitelistBlacklist" +) + +// UserConfigServiceClient is the client API for UserConfigService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type UserConfigServiceClient interface { + Update(ctx context.Context, in *UserConfigServiceUpdateRequest, opts ...grpc.CallOption) (*EmptyResponse, error) + Get(ctx context.Context, in *UserConfigServiceGetRequest, opts ...grpc.CallOption) (*UserConfigServiceGetResponse, error) + UpdateWhitelistBlacklist(ctx context.Context, in *UserConfigServiceUpdateWLBLRequest, opts ...grpc.CallOption) (*EmptyResponse, error) + DeleteWhitelistBlacklist(ctx context.Context, in *UserConfigServiceDeleteWLBLRequest, opts ...grpc.CallOption) (*EmptyResponse, error) +} + +type userConfigServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserConfigServiceClient(cc grpc.ClientConnInterface) UserConfigServiceClient { + return &userConfigServiceClient{cc} +} + +func (c *userConfigServiceClient) Update(ctx context.Context, in *UserConfigServiceUpdateRequest, opts ...grpc.CallOption) (*EmptyResponse, error) { + out := new(EmptyResponse) + err := c.cc.Invoke(ctx, UserConfigService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userConfigServiceClient) Get(ctx context.Context, in *UserConfigServiceGetRequest, opts ...grpc.CallOption) (*UserConfigServiceGetResponse, error) { + out := new(UserConfigServiceGetResponse) + err := c.cc.Invoke(ctx, UserConfigService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userConfigServiceClient) UpdateWhitelistBlacklist(ctx context.Context, in *UserConfigServiceUpdateWLBLRequest, opts ...grpc.CallOption) (*EmptyResponse, error) { + out := new(EmptyResponse) + err := c.cc.Invoke(ctx, UserConfigService_UpdateWhitelistBlacklist_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userConfigServiceClient) DeleteWhitelistBlacklist(ctx context.Context, in *UserConfigServiceDeleteWLBLRequest, opts ...grpc.CallOption) (*EmptyResponse, error) { + out := new(EmptyResponse) + err := c.cc.Invoke(ctx, UserConfigService_DeleteWhitelistBlacklist_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserConfigServiceServer is the server API for UserConfigService service. +// All implementations must embed UnimplementedUserConfigServiceServer +// for forward compatibility +type UserConfigServiceServer interface { + Update(context.Context, *UserConfigServiceUpdateRequest) (*EmptyResponse, error) + Get(context.Context, *UserConfigServiceGetRequest) (*UserConfigServiceGetResponse, error) + UpdateWhitelistBlacklist(context.Context, *UserConfigServiceUpdateWLBLRequest) (*EmptyResponse, error) + DeleteWhitelistBlacklist(context.Context, *UserConfigServiceDeleteWLBLRequest) (*EmptyResponse, error) + mustEmbedUnimplementedUserConfigServiceServer() +} + +// UnimplementedUserConfigServiceServer must be embedded to have forward compatible implementations. +type UnimplementedUserConfigServiceServer struct { +} + +func (UnimplementedUserConfigServiceServer) Update(context.Context, *UserConfigServiceUpdateRequest) (*EmptyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedUserConfigServiceServer) Get(context.Context, *UserConfigServiceGetRequest) (*UserConfigServiceGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedUserConfigServiceServer) UpdateWhitelistBlacklist(context.Context, *UserConfigServiceUpdateWLBLRequest) (*EmptyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWhitelistBlacklist not implemented") +} +func (UnimplementedUserConfigServiceServer) DeleteWhitelistBlacklist(context.Context, *UserConfigServiceDeleteWLBLRequest) (*EmptyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWhitelistBlacklist not implemented") +} +func (UnimplementedUserConfigServiceServer) mustEmbedUnimplementedUserConfigServiceServer() {} + +// UnsafeUserConfigServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserConfigServiceServer will +// result in compilation errors. +type UnsafeUserConfigServiceServer interface { + mustEmbedUnimplementedUserConfigServiceServer() +} + +func RegisterUserConfigServiceServer(s grpc.ServiceRegistrar, srv UserConfigServiceServer) { + s.RegisterService(&UserConfigService_ServiceDesc, srv) +} + +func _UserConfigService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserConfigServiceUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserConfigServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserConfigService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserConfigServiceServer).Update(ctx, req.(*UserConfigServiceUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserConfigService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserConfigServiceGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserConfigServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserConfigService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserConfigServiceServer).Get(ctx, req.(*UserConfigServiceGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserConfigService_UpdateWhitelistBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserConfigServiceUpdateWLBLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserConfigServiceServer).UpdateWhitelistBlacklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserConfigService_UpdateWhitelistBlacklist_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserConfigServiceServer).UpdateWhitelistBlacklist(ctx, req.(*UserConfigServiceUpdateWLBLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserConfigService_DeleteWhitelistBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserConfigServiceDeleteWLBLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserConfigServiceServer).DeleteWhitelistBlacklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserConfigService_DeleteWhitelistBlacklist_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserConfigServiceServer).DeleteWhitelistBlacklist(ctx, req.(*UserConfigServiceDeleteWLBLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserConfigService_ServiceDesc is the grpc.ServiceDesc for UserConfigService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserConfigService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "risk_control.service.v1.UserConfigService", + HandlerType: (*UserConfigServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Update", + Handler: _UserConfigService_Update_Handler, + }, + { + MethodName: "Get", + Handler: _UserConfigService_Get_Handler, + }, + { + MethodName: "UpdateWhitelistBlacklist", + Handler: _UserConfigService_UpdateWhitelistBlacklist_Handler, + }, + { + MethodName: "DeleteWhitelistBlacklist", + Handler: _UserConfigService_DeleteWhitelistBlacklist_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "risk-control/service/v1/risk_control.proto", +} diff --git a/gsm/risk.go b/gsm/risk.go new file mode 100644 index 0000000000..ebb47ee6f8 --- /dev/null +++ b/gsm/risk.go @@ -0,0 +1,241 @@ +package gsm + +import ( + "context" + "crypto/tls" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + pb "github.com/ethereum/go-ethereum/gsm/proto/v1" + "github.com/ethereum/go-ethereum/log" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/metadata" + "sync" + "time" +) + +const ( + // ChainId represents the BNB Smart Chain Mainnet identifier + ChainId = "56" + + // EndPoint is the service endpoint URL (replace with actual URL in production) + EndPoint = "placeholder" + + // ApiKey for authentication with the risk service (replace with actual key in production) + ApiKey = "placeholder" + + // PingInterval defines how often keepalive pings are sent to maintain connection + PingInterval = 10 * time.Second + + // PingTimeout defines the timeout for keepalive pings + PingTimeout = 5 * time.Second + + // InvokeTimeout defines the maximum duration to wait for a risk service response + // Short timeout prevents blocking transaction processing + InvokeTimeout = 500 * time.Millisecond + + // RiskThreshold defines the minimum score at which a transaction is considered risky + RiskThreshold = 20 +) + +// RiskServiceClient encapsulates the client for the risk assessment service. +// It manages the gRPC connection and provides methods for transaction risk evaluation. +type RiskServiceClient struct { + client pb.RiskControlClient + conn *grpc.ClientConn + once sync.Once // Ensures connection is closed only once +} + +var ( + // Singleton instance of the risk client + riskClient *RiskServiceClient + clientMu sync.Mutex // Mutex to protect singleton instantiation +) + +// GetRiskServiceClient returns a singleton instance of the RiskServiceClient. +// The client is created on first call and reused for subsequent calls. +func GetRiskServiceClient() *RiskServiceClient { + clientMu.Lock() + defer clientMu.Unlock() + + if riskClient == nil { + // Configure gRPC connection options + opts := []grpc.DialOption{ + grpc.WithKeepaliveParams(keepalive.ClientParameters{ + Time: PingInterval, // Send pings every 10 seconds to keep connection alive + Timeout: PingTimeout, // 5 second timeout for ping responses + PermitWithoutStream: true, // Allow pings when no active streams exist + }), + grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{ + InsecureSkipVerify: true, // Note: In production, proper certificate validation should be implemented + })), + grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`), + } + + // Create client connection - this doesn't connect immediately + conn, err := grpc.NewClient(EndPoint, opts...) + if err != nil { + // This type of error typically indicates configuration issues such as invalid options + panic(err) + } + + // Initialize the risk control client + client := pb.NewRiskControlClient(conn) + + riskClient = &RiskServiceClient{ + client: client, + conn: conn, + } + } + + return riskClient +} + +// Close terminates the gRPC connection. +// This method is typically only called when the application is shutting down. +// The sync.Once ensures that the connection is closed only once. +func (c *RiskServiceClient) Close() { + c.once.Do(func() { + if c.conn != nil { + c.conn.Close() + } + }) +} + +// IsRiskyTx evaluates a single transaction for risk. +// Returns true if the transaction is deemed risky based on the risk threshold. +// This is a non-blocking evaluation - if the GSM service fails or times out, the check is bypassed. +func (c *RiskServiceClient) IsRiskyTx(tx *types.Transaction, fromAddr common.Address) bool { + // Serialize the transaction for transmission + txBytes, _ := tx.MarshalBinary() + req := &pb.EVMRiskScoreRequest{ + TxObj: txBytes, + ChainId: ChainId, + From: fromAddr.Hex(), + EnableScoring: true, + } + + // Create a context with a 500ms timeout to prevent long-running requests + ctx, cancel := context.WithTimeout(context.Background(), InvokeTimeout) + ctx = metadata.NewOutgoingContext(ctx, metadata.Pairs("x-api-key", ApiKey)) + defer cancel() + + // Execute the gRPC call + resp, err := c.client.EVMRiskScore(ctx, req) + if err != nil { + log.Error("Failed to call gsm.EVMRiskScore", "error", err.Error()) + return false // Allow transaction to proceed if risk service is unavailable + } + + score := resp.GetScore() + + // Evaluate risk score against threshold + if score >= RiskThreshold { + log.Warn("High risk transaction detected", "from", fromAddr.Hex(), "tx", tx.Hash().Hex(), "risk-score", score) + return true // Transaction is risky + } else { + log.Debug("gsm.EVMRiskScore", "from", fromAddr.Hex(), "tx", tx.Hash().Hex(), "risk-score", score) + return false // Transaction is acceptable + } +} + +// BuildBatchIsRiskyTxRequest prepares a batch risk assessment request from a map of transactions. +// This method is primarily used for performance testing and benchmarking. +func (c *RiskServiceClient) BuildBatchIsRiskyTxRequest(readyMap *map[common.Address]types.Transactions) *pb.EVMBatchRiskScoreRequest { + // Initialize the request structure + req := &pb.EVMBatchRiskScoreRequest{ + FromMap: make(map[string]*pb.TxObjList), + ChainId: ChainId, + EnableScoring: true, + } + + totalTx := 0 + for addr, inputTxList := range *readyMap { + totalTx += len(inputTxList) + + // Serialize each transaction in the list + txList := pb.TxObjList{} + for _, inputTx := range inputTxList { + txBytes, err := inputTx.MarshalBinary() + if err != nil { + log.Error("Failed to serialize tx.", "hash", inputTx.Hash(), "reason", err.Error()) + // TODO: Mark transactions to skip verification, otherwise they cannot proceed + continue + } + txList.Items = append(txList.Items, txBytes) + } + + // Only add to request if there are transactions for this address + if inputTxList.Len() > 0 { + req.FromMap[addr.Hex()] = &txList + } + } + return req +} + +// BatchIsRiskyTx evaluates multiple transactions for risk in a single call. +// Returns a map from sender addresses to an array of boolean flags, +// where true indicates the corresponding transaction is risky. +// The returned structure maintains the same dimensions as the input map. +func (c *RiskServiceClient) BatchIsRiskyTx(readyMap *map[common.Address]types.Transactions) map[common.Address][]bool { + // Initialize result map with default values (false = not risky) + result := make(map[common.Address][]bool) + + // Prepare the batch request + req := &pb.EVMBatchRiskScoreRequest{ + FromMap: make(map[string]*pb.TxObjList), + ChainId: ChainId, + EnableScoring: true, + } + + totalTx := 0 + for addr, inputTxList := range *readyMap { + // Initialize result array for this address + result[addr] = make([]bool, len(inputTxList)) + totalTx += len(inputTxList) + + // Serialize transactions for this address + txList := pb.TxObjList{} + for _, inputTx := range inputTxList { + txBytes, err := inputTx.MarshalBinary() + if err != nil { + log.Error("Failed to serialize tx.", "hash", inputTx.Hash(), "reason", err.Error()) + // TODO: Mark transactions to skip verification, otherwise they cannot proceed + continue + } + txList.Items = append(txList.Items, txBytes) + } + + // Only add non-empty transaction lists + if inputTxList.Len() > 0 { + req.FromMap[addr.Hex()] = &txList + } + } + + // Create a context with a 500ms timeout to prevent long-running requests + ctx, cancel := context.WithTimeout(context.Background(), InvokeTimeout) + ctx = metadata.NewOutgoingContext(ctx, metadata.Pairs("x-api-key", ApiKey)) + defer cancel() + + // Execute the gRPC call + resp, err := c.client.EVMBatchRiskScore(ctx, req) + if err != nil { + log.Error("Failed to call gsm.EVMBatchRiskScore", "error", err.Error()) + return result // Return default results (all false) if service call fails + } + + // Process results and update risk flags + log.Debug("gsm.EVMBatchRiskScore is called", "transaction_count", totalTx) + for addr, reasonList := range resp.GetFromMap() { + riskyArr := result[common.HexToAddress(addr)] + for idx, reason := range reasonList.GetScoreReasonList() { + score := reason.GetScore() + if score >= RiskThreshold { + log.Warn("High risk transaction detected", "from", addr, "tx", (*readyMap)[common.HexToAddress(addr)][idx].Hash(), "risk-score", score) + riskyArr[idx] = true // Mark this transaction as risky + } + } + } + return result +} diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 24b734180d..c1a71cb1eb 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -21,6 +21,7 @@ import ( "encoding/hex" "errors" "fmt" + "github.com/ethereum/go-ethereum/gsm" gomath "math" "math/big" "strings" @@ -2123,16 +2124,28 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c // Ensure only eip155 signed transactions are submitted if EIP155Required is set. return common.Hash{}, errors.New("only replay-protected (EIP-155) transactions allowed over RPC") } - if err := b.SendTx(ctx, tx); err != nil { - return common.Hash{}, err - } + // Print a log with full tx details for manual investigations and interventions head := b.CurrentBlock() signer := types.MakeSigner(b.ChainConfig(), head.Number, head.Time) from, err := types.Sender(signer, tx) if err != nil { + log.Warn("Failed to determine transaction sender", "tx", tx.Hash(), "error", err) return common.Hash{}, err } + + // Perform risk assessment before adding to mempool + // This proactively filters suspicious transactions, preventing malicious + // transactions from entering the mempool and consuming resources + if gsm.GetRiskServiceClient().IsRiskyTx(tx, from) { + log.Warn("[SubmitTransaction] Dropped risky transaction", "from", from.Hex(), "tx", tx.Hash()) + return common.Hash{}, errors.New("transaction rejected by GSM") + } + + if err := b.SendTx(ctx, tx); err != nil { + return common.Hash{}, err + } + xForward := ctx.Value("X-Forwarded-For") if tx.To() == nil {